Exemple #1
0
 def test_get_by_id_positive(self):
     """Positive test of the CustomUser.get_by_id() method"""
     author = Author.get_by_id(101)
     self.assertEqual(author.id, 101)
     self.assertEqual(author.name, 'author1')
     self.assertEqual(author.surname, "s1")
     self.assertEqual(author.patronymic, "p1")
Exemple #2
0
 def test_get_by_id_negative(self):
     """Negative test of the CustomUser.get_by_id() method"""
     author = Author.get_by_id(999)
     self.assertIsNone(author)