说明
python appointmentfactory示例是从最受好评的开源项目中提取的实现代码,你可以参考下面示例的使用方式。
编程语言: Python
命名空间/包名称: plannermaintesttests
示例#1文件:
schedule_tests.py项目:
slspeek/gnudok-planner
def setUp(self):
TestCase.setUp(self)
self.rule = RuleFactory()
self.rule.active = False
self.rule.save()
self.date = datetime.date(2012, 10, 29)
self.appointment = AppointmentFactory.create(calendar__car=self.rule.car,
calendar__timeslot=self.rule.timeslot)
示例#2文件:
schedule_tests.py项目:
slspeek/gnudok-planner
def setUp(self):
TestCase.setUp(self)
self.car = CarFactory()
self.timeslot = TimeSlotFactory()
self.rule = RuleFactory(car=self.car, timeslot=self.timeslot)
self.appointment = AppointmentFactory.create(
calendar__car=self.car,
calendar__timeslot=self.timeslot,
kind=KIND_DELIVERY,
weight=1)
self.date = datetime.date(2012, 10, 29)
示例#3文件:
schedule_tests.py项目:
slspeek/gnudok-planner
def setUp(self):
TestCase.setUp(self)
self.car = CarFactory()
self.region = RegionFactory()
self.timeslot = TimeSlotFactory()
self.rule = RuleFactory(car=self.car, timeslot=self.timeslot, region=self.region)
self.appointment = AppointmentFactory.create(
calendar__car=self.car,
calendar__timeslot=self.timeslot)
self.date = datetime.date(2012, 10, 29)
self.other_date = datetime.date(2012, 10, 30)