def test_update(self): """Verify the object attributes can be updated using a dict.""" obj = Sex() obj.__dict__.update({ 'slug': 'F', 'name_en': 'Female', }) obj.save()
def test_name(self): """verify the localized name is set once the object is saved.""" obj = Sex(slug='F', name_en='Female') obj.save() self.assertEqual('Female', obj.name)
def test_representation(self): """Verify the object can be displayed in a foreign key field.""" obj = Sex(slug='F', name_en='Female') obj.save() self.assertTrue(unicode(obj))