Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions
CMFCalendar.tests.test_Event.TestEvent Class Reference
Inheritance diagram for CMFCalendar.tests.test_Event.TestEvent:
Inheritance graph
[legend]
Collaboration diagram for CMFCalendar.tests.test_Event.TestEvent:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_z3interfaces
def test_new
def test_edit
def test_puke

Private Member Functions

def _getTargetClass
def _makeOne

Detailed Description

Definition at line 27 of file test_Event.py.


Member Function Documentation

Definition at line 29 of file test_Event.py.

00029 
00030     def _getTargetClass(self):
00031         from Products.CMFCalendar.Event import Event
00032 
00033         return Event

def CMFCalendar.tests.test_Event.TestEvent._makeOne (   self,
  args,
  kw 
) [private]

Definition at line 34 of file test_Event.py.

00034 
00035     def _makeOne(self, *args, **kw):
00036         return self._getTargetClass()(*args, **kw)

Here is the call graph for this function:

Definition at line 51 of file test_Event.py.

00051 
00052     def test_edit(self):
00053         # Year month and day were processed in the wrong order
00054         # Also see http://collector.zope.org/CMF/202
00055         event = self._makeOne('foo')
00056         event.edit( title='title'
00057                   , description='description'
00058                   , eventType=( 'eventType', )
00059                   , effectiveDay=1
00060                   , effectiveMo=5
00061                   , effectiveYear=1999
00062                   , expirationDay=31
00063                   , expirationMo=12
00064                   , expirationYear=1999
00065                   , start_time="00:00"
00066                   , startAMPM="AM"
00067                   , stop_time="11:59"
00068                   , stopAMPM="PM"
00069                   )
00070 
00071         self.assertEqual( event.Title(), 'title' )
00072         self.assertEqual( event.Description(), 'description' )
00073         self.assertEqual( event.Subject(), ( 'eventType', ), event.Subject() )
00074         self.assertEqual( event.effective_date, None )
00075         self.assertEqual( event.expiration_date, None )
00076         self.assertEqual( event.end(), DateTime('1999/12/31 23:59') )
00077         self.assertEqual( event.start(), DateTime('1999/05/01 00:00') )
00078         self.failIf( event.contact_name )

Here is the call graph for this function:

Definition at line 45 of file test_Event.py.

00045 
00046     def test_new(self):
00047         event = self._makeOne('test')
00048 
00049         self.assertEqual( event.getId(), 'test' )
00050         self.failIf( event.Title() )

Here is the call graph for this function:

Definition at line 79 of file test_Event.py.

00079 
00080     def test_puke(self):
00081         event = self._makeOne('shouldPuke')
00082 
00083         self.assertRaises( DateTime.DateError
00084                          , event.edit
00085                          , effectiveDay=31
00086                          , effectiveMo=2
00087                          , effectiveYear=1999
00088                          , start_time="00:00"
00089                          , startAMPM="AM"
00090                          )

Here is the call graph for this function:

Definition at line 37 of file test_Event.py.

00037 
00038     def test_z3interfaces(self):
00039         from zope.interface.verify import verifyClass
00040         from Products.CMFCalendar.interfaces import IEvent
00041         from Products.CMFCalendar.interfaces import IMutableEvent
00042 
00043         verifyClass(IEvent, self._getTargetClass())
00044         verifyClass(IMutableEvent, self._getTargetClass())

Here is the call graph for this function:


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