コード例 #1
0
 def test_representation(self):
     """Verify the object representation is not None or an empty string."""
     obj = Detail(entry=EntryFactory(), count=0)
     obj.save()
     self.assertTrue(unicode(obj))
コード例 #2
0
 def test_plumage_is_optional(self):
     """Verify plumage can be left unset."""
     obj = Detail(entry=EntryFactory(), count=0)
     obj.save()
     self.assertIsNone(obj.plumage)
コード例 #3
0
 def test_direction_is_optional(self):
     """Verify direction can be left unset."""
     obj = Detail(entry=EntryFactory(), count=0)
     obj.save()
     self.assertIsNone(obj.direction)
コード例 #4
0
 def test_default_longitude(self):
     """Verify that longitude defaults to an empty string."""
     obj = Detail(entry=EntryFactory(), count=0)
     obj.save()
     self.assertEqual('', obj.lon)