def test_extra_fields(self): user = User(id=1, name='user1') user.update({'name': 'user2', 'extra': 'extra field'}) self.assertFalse(hasattr(user, 'extra'))
def test_normal(self): user = User(id=1, name='user1') user.update({'id': 1, 'name': 'user2'}) self.assertEquals(1, user.id) self.assertEquals('user2', user.name)