def test_name(self): """verify the localized name is set once the object is saved.""" obj = SpeciesGroup( order='Order', family='Family', genus='Genus', name_en='Group' ) obj.save() self.assertEqual('Group', obj.name)
def test_representation(self): """Verify the object can be displayed in the admin.""" obj = SpeciesGroup( order='Order', family='Family', genus='Genus', name_en='Group' ) obj.save() self.assertEqual(u"%s (%s)" % (obj.name, obj.genus), unicode(obj))
def test_update(self): """Verify the object attributes can be updated using a dict.""" obj = SpeciesGroup() obj.__dict__.update({ 'order': 'Order', 'family': 'Family', 'genus': 'Genus', 'name_en': 'Group', }) obj.save()