Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testZero
def testBInt
def testKBInt
def testMBInt
def testGBInt
def testGBFloat
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 ob

Detailed Description

Definition at line 51 of file testGetObjectSize.py.


Member Function Documentation

Definition at line 53 of file testGetObjectSize.py.

00053 
00054     def afterSetUp(self):
00055         self.ob = dummy.SizedItem()

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 60 of file testGetObjectSize.py.

00060 
00061     def testBInt(self):
00062         self.ob.set_size(884)
00063         self.assertEquals(self.portal.getObjSize(self.ob), '1 kB')

Definition at line 76 of file testGetObjectSize.py.

00076 
00077     def testGBFloat(self):
00078         self.ob.set_size(float(1024*1024*1024+1024*1024*107))
00079         self.assertEquals(self.portal.getObjSize(self.ob), '1.1 GB')
00080 

Definition at line 72 of file testGetObjectSize.py.

00072 
00073     def testGBInt(self):
00074         self.ob.set_size(1024*1024*1024+1024*1024*107)
00075         self.assertEquals(self.portal.getObjSize(self.ob), '1.1 GB')

Definition at line 64 of file testGetObjectSize.py.

00064 
00065     def testKBInt(self):
00066         self.ob.set_size(1348)
00067         self.assertEquals(self.portal.getObjSize(self.ob), '1.3 kB')

Definition at line 68 of file testGetObjectSize.py.

00068 
00069     def testMBInt(self):
00070         self.ob.set_size(1024*1024+1024*687)
00071         self.assertEquals(self.portal.getObjSize(self.ob), '1.7 MB')

Definition at line 56 of file testGetObjectSize.py.

00056 
00057     def testZero(self):
00058         self.ob.set_size(0)
00059         self.assertEquals(self.portal.getObjSize(self.ob), '0 kB')


Member Data Documentation

Definition at line 54 of file testGetObjectSize.py.


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