Beispiel #1
0
 def test_get_found(self, mock_query):
     mock_query.return_value = {
         'id': '0000',
         'name': 'foo',
         'email': '*****@*****.**'
     }
     user = User.get('0000')
     self.assertTrue(isinstance(user, User))
     self.assertEqual(user.id, '0000')
Beispiel #2
0
 def load_user(user_id):
     return User.get(user_id)