def setUp(self): """ Fixtures. """ super(TestDataDumps, self).setUp() due = datetime.datetime(2010, 5, 12, 2, 42, tzinfo=UTC) course = CourseFactory.create() week1 = ItemFactory.create(due=due, parent=course) week2 = ItemFactory.create(due=due, parent=course) homework = ItemFactory.create( parent=week1, due=due ) user1 = UserFactory.create() user2 = UserFactory.create() self.course = course self.week1 = week1 self.homework = homework self.week2 = week2 self.user1 = user1 self.user2 = user2 signals.extract_dates(None, course.id)
def setUp(self): """ Fixtures. """ super(TestSetDueDateExtension, self).setUp() self.due = due = datetime.datetime(2010, 5, 12, 2, 42, tzinfo=UTC) course = CourseFactory.create() week1 = ItemFactory.create(due=due, parent=course) week2 = ItemFactory.create(due=due, parent=course) week3 = ItemFactory.create(parent=course) homework = ItemFactory.create(parent=week1) assignment = ItemFactory.create(parent=homework, due=due) signals.extract_dates(None, course.id) user = UserFactory.create() self.course = course self.week1 = week1 self.homework = homework self.assignment = assignment self.week2 = week2 self.week3 = week3 self.user = user inject_field_data((course, week1, week2, week3, homework, assignment), course, user)