def test_create_task_empty(self): # but what happens when the task has no entries yet? self.login() task = Task(name='empty_task') task.save() response = self.client.get( reverse('focus:task', args=(task.pk,)), follow=True ) assert_less(response.status_code, 400)
class FocusSetup(SetupMixin): def setUp(self): super(FocusSetup, self).setUp() self.task = Task( owner=self.staff_user, name="demo", unit_of_measure="km.", chart_full_history=True, highlight_chart="_display_full_history", ) self.task.save() self.entries = demo_data(self.task, num=51) for entry in self.entries: entry.save() def tearDown(self): super(FocusSetup, self).tearDown()