示例#1
0
文件: tests.py 项目: BoichukN/Library
 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")
示例#2
0
文件: tests.py 项目: BoichukN/Library
 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)