def test_default_url(self):
     """Verify url defaults to an empty string."""
     obj = Checklist(
         location=LocationFactory(),
         date=timezone.now().date(),
     )
     obj.save()
     self.assertEqual('', obj.url)
 def test_default_reporter(self):
     """Verify reporter is None."""
     obj = Checklist(
         location=LocationFactory(),
         date=timezone.now().date(),
     )
     obj.save()
     self.assertEqual(None, obj.reporter)
 def test_default_identifier(self):
     """Verify that identifier defaults to an empty string."""
     obj = Checklist(
         location=LocationFactory(),
         date=timezone.now().date(),
     )
     obj.save()
     self.assertFalse(obj.identifier)
 def test_default_include(self):
     """Verify that include defaults to False."""
     obj = Checklist(
         location=LocationFactory(),
         date=timezone.now().date(),
     )
     obj.save()
     self.assertFalse(obj.include)
 def test_added_on_is_set(self):
     """Verify added_on is set for new objects."""
     location = Location.objects.create(name='Location')
     obj = Checklist(
         location=location,
         date=timezone.now().date(),
     )
     obj.save()
     self.assertEqual(timezone.now().date(), obj.added_on)
 def test_default_comment(self):
     """Verify comment defaults to an empty string for new objects."""
     location = Location.objects.create(name='Location')
     obj = Checklist(
         location=location,
         date=timezone.now().date(),
     )
     obj.save()
     self.assertEqual('', obj.comment)
 def test_default_complete(self):
     """Verify complete defaults to False for new objects."""
     location = Location.objects.create(name='Location')
     obj = Checklist(
         location=location,
         date=timezone.now().date(),
     )
     obj.save()
     self.assertEqual(False, obj.complete)
 def test_default_observer_count(self):
     """Verify observer count is set from number of observers."""
     location = Location.objects.create(name='Location')
     obj = Checklist(
         location=location,
         date=timezone.now().date(),
     )
     obj.save()
     obj.observers.add(ObserverFactory(), ObserverFactory(),
                       ObserverFactory())
     obj.save()
     self.assertEqual(3, obj.observers_count)