def test_default_duration_minutes(self): """Verify that duration minutes defaults to zero if not set.""" obj = Method( protocol=ProtocolFactory(), checklist=ChecklistFactory(), time=time(12, 0, 0), ) obj.save() self.assertEqual(0, obj.duration_minutes)
def test_default_area(self): """Verify that area defaults to zero if not set.""" obj = Method( protocol=ProtocolFactory(), checklist=ChecklistFactory(), time=time(12, 0, 0) ) obj.save() self.assertEqual(0, obj.area)
def test_method_is_optional(self): """Verify method is optional.""" method = Method( protocol=ProtocolFactory(), checklist=ChecklistFactory(), time=timezone.now().time(), ) method.save() method.checklist.method.delete() method.checklist.save()