示例#1
0
 def test_update(self):
     """Verify the object attributes can be updated using a dict."""
     obj = Plumage()
     obj.__dict__.update({
         'slug': 'BPH',
         'name_en': 'Blue Phase',
     })
     obj.save()
示例#2
0
 def test_name(self):
     """verify the localized name is set once the object is saved."""
     obj = Plumage(slug='BPH', name_en='Blue Phase')
     obj.save()
     self.assertEqual('Blue Phase', obj.name)
示例#3
0
 def test_representation(self):
     """Verify the object can be displayed in a foreign key field."""
     obj = Plumage(slug='BPH', name_en='Blue Phase')
     obj.save()
     self.assertTrue(unicode(obj))