Beispiel #1
0
 def setUp(self):
     faculty_test_data.Command().handle()
     self.p = Person.objects.get(userid='ggbaker')
     self.u = Unit.objects.get(id=1)
     self.date = datetime.date(2014, 1, 1)
     self.e = CareerEvent(person=self.p,
                          unit=self.u,
                          event_type="APPOINT",
                          start_date=self.date)
     self.e.get_handler().save(self.p)
Beispiel #2
0
    def setUp(self):
        faculty_test_data.Command().handle()

        class FoobarHandler(CareerEventHandlerBase):

            EVENT_TYPE = 'FOOBAR'
            NAME = 'Foo'

            def short_summary(self):
                return 'foobar'

        class FoobarHandlerInstant(FoobarHandler):
            IS_INSTANT = True

        self.Handler = FoobarHandler
        self.HandlerInstant = FoobarHandlerInstant
        self.person = Person.objects.get(userid='ggbaker')
        self.unit = Unit.objects.get(id=1)

        # XXX: Monkey-patch the test Handler into the global handler dict
        EVENT_TYPES['FOOBAR'] = FoobarHandler
Beispiel #3
0
 def setUp(self):
     faculty_test_data.Command().handle()