Ejemplo n.º 1
0
 def test_check_with_wrong_id(self):
     with self.assertRaises(Exception) as ex:
         check_new_item(base_url_book,
                        str(random.randint(4000000000, 9120000001)),
                        book_dict)
     self.assertEqual("Wrong request", str(ex.exception))
Ejemplo n.º 2
0
 def test_check_correct_data(self):
     result = check_new_item(base_url_book, self.book_id, book_dict)
     self.assertIsNone(result)
Ejemplo n.º 3
0
 def test_check_with_wrong_id(self, setup_and_teardown):
     with pytest.raises(Exception) as ex:
         check_new_item(base_url_book,
                        str(random.randint(4000000000, 9120000001)),
                        book_dict)
     assert "Wrong request" == str(ex.value)
Ejemplo n.º 4
0
 def test_check_correct_data(self, setup_and_teardown):
     result = check_new_item(base_url_book, self.book_id, book_dict)
     assert result is None
Ejemplo n.º 5
0
 def test_check_correct_data(self):
     result = check_new_item(base_url_role, self.role_id, role_dict)
     self.assertIsNone(result)
 def test_check_with_wrong_id(self):
     with pytest.raises(Exception) as ex:
         check_new_item(base_url_role,
                        str(random.randint(4000000000, 9120000001)),
                        role_dict)
     assert "Wrong request" == str(ex.value)