Back to index

plone3  3.1.7
Classes | Functions
CMFDefault.tests.test_DublinCore Namespace Reference

Classes

class  DummyMetadataTool
class  DublinCoreTests

Functions

def _DateIndexConvert
def test_suite

Function Documentation

Definition at line 32 of file test_DublinCore.py.

00032 
00033 def _DateIndexConvert(value):
00034     # Duplicate date conversion done by DateIndex._convert
00035     t_tup = value.toZone('UTC').parts()
00036     yr = t_tup[0]
00037     mo = t_tup[1]
00038     dy = t_tup[2]
00039     hr = t_tup[3]
00040     mn = t_tup[4]
00041     t_val = ((((yr * 12 + mo) * 31 + dy) * 24 + hr) * 60 + mn)
00042 
00043     if isinstance(t_val, long):
00044         # t_val must be IntType, not LongType
00045         raise OverflowError("Date too big: %s" % `value`)
00046 
00047     return t_val
00048 

Here is the caller graph for this function:

Definition at line 235 of file test_DublinCore.py.

00235 
00236 def test_suite():
00237     return unittest.TestSuite((
00238         unittest.makeSuite(DublinCoreTests),
00239         ))