def test_user_dict_no_file(self): user = type('User', (object,), {'id': 'bob', 'access': 'foo', 'secret': 'bar'}) expected_user_dict = {'username': '******', 'accesskey': 'foo', 'secretkey': 'bar', 'file': None} self.assertEqual(expected_user_dict, admin.user_dict(user))
def test_user_dict_no_file(self): user = type('User', (object, ), { 'id': 'bob', 'access': 'foo', 'secret': 'bar' }) expected_user_dict = { 'username': '******', 'accesskey': 'foo', 'secretkey': 'bar', 'file': None } self.assertEqual(expected_user_dict, admin.user_dict(user))
def test_user_dict_no_user(self): self.assertEqual({}, admin.user_dict(None))