Back to index

plone3  3.1.7
Public Member Functions
CMFPlone.tests.testGetObjectSize.TestGetObjSize Class Reference
Inheritance diagram for CMFPlone.tests.testGetObjectSize.TestGetObjSize:
Inheritance graph
[legend]
Collaboration diagram for CMFPlone.tests.testGetObjectSize.TestGetObjSize:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def testZeroInt
def testBInt
def testKBInt
def testMBInt
def testGBInt
def testZeroFloat
def testBFloat
def testKBFloat
def testMBFloat
def testGBFloat
def testNone
def testEmptyString
def testNonIntString
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Detailed Description

Definition at line 9 of file testGetObjectSize.py.


Member Function Documentation

Definition at line 30 of file PloneTestCase.py.

00030 
00031     def getAuthenticator(self):
00032         tag = AuthenticatorView('context', 'request').authenticator()
00033         pattern = '<input .*name="(\w+)".*value="(\w+)"'
00034         return match(pattern, tag).groups()

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFPlone.tests.PloneTestCase.PloneTestCase.setRequestMethod (   self,
  method 
) [inherited]
This is a stub now, but in case you want to try
   something fancy on Your Branch (tm), put it here.

Definition at line 26 of file PloneTestCase.py.

00026 
00027     def setRequestMethod(self, method):
00028         self.app.REQUEST.set('REQUEST_METHOD', method)
00029         self.app.REQUEST.method = method

Here is the caller graph for this function:

Definition at line 35 of file PloneTestCase.py.

00035 
00036     def setupAuthenticator(self):
00037         name, token = self.getAuthenticator()
00038         self.app.REQUEST.form[name] = token
00039 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 29 of file testGetObjectSize.py.

00029 
00030     def testBFloat(self):
00031         self.assertEqual(self.portal.getObjSize(None, 234.5), "1 kB")

Definition at line 14 of file testGetObjectSize.py.

00014 
00015     def testBInt(self):
00016         self.assertEqual(self.portal.getObjSize(None, 234), "1 kB")

Definition at line 44 of file testGetObjectSize.py.

00044 
00045     def testEmptyString(self):
00046         self.assertEqual(self.portal.getObjSize(None, ''), "0 kB")

Definition at line 38 of file testGetObjectSize.py.

00038 
00039     def testGBFloat(self):
00040         self.assertEqual(self.portal.getObjSize(None, 7564738298.5), "7.0 GB")

Definition at line 23 of file testGetObjectSize.py.

00023 
00024     def testGBInt(self):
00025         self.assertEqual(self.portal.getObjSize(None, 7564738298), "7.0 GB")

Definition at line 32 of file testGetObjectSize.py.

00032 
00033     def testKBFloat(self):
00034         self.assertEqual(self.portal.getObjSize(None, 5678.5), "5.5 kB")

Definition at line 17 of file testGetObjectSize.py.

00017 
00018     def testKBInt(self):
00019         self.assertEqual(self.portal.getObjSize(None, 5678), "5.5 kB")

Definition at line 35 of file testGetObjectSize.py.

00035 
00036     def testMBFloat(self):
00037         self.assertEqual(self.portal.getObjSize(None, 3307520.5), "3.2 MB")

Definition at line 20 of file testGetObjectSize.py.

00020 
00021     def testMBInt(self):
00022         self.assertEqual(self.portal.getObjSize(None, 3307520), "3.2 MB")

Definition at line 41 of file testGetObjectSize.py.

00041 
00042     def testNone(self):
00043         self.assertEqual(self.portal.getObjSize(None, None), "0 kB")

Definition at line 47 of file testGetObjectSize.py.

00047 
00048     def testNonIntString(self):
00049         self.assertEqual(self.portal.getObjSize(None, 'barney'), 'barney')

Definition at line 26 of file testGetObjectSize.py.

00026 
00027     def testZeroFloat(self):
00028         self.assertEqual(self.portal.getObjSize(None, 0.0), "0 kB")

Definition at line 11 of file testGetObjectSize.py.

00011 
00012     def testZeroInt(self):
00013         self.assertEqual(self.portal.getObjSize(None, 0), "0 kB")


The documentation for this class was generated from the following file: