Exemplo n.º 1
0
 def test_find_existing_id(self):
     existing_id = 1
     user_with_id = User(first_name='test',
                         last_name='test',
                         email='*****@*****.**',
                         password='******')
     user_with_id.create()
     result = User.find_by_id(existing_id)
     self.assertEqual(result.id, existing_id)
Exemplo n.º 2
0
 def test_find_nonexistent_id(self):
     nonexistent_id = 5
     user_with_id = User(first_name='test',
                         last_name='test',
                         email='*****@*****.**',
                         password='******')
     user_with_id.create()
     result = User.find_by_id(nonexistent_id)
     self.assertEqual(result, None)