def test_duplicate_category(self): category = Category("Sci-fi") db.session.add(category) db.session.commit() self.args['category_name'] = 'Sci-fi' json_result = rating_book_request_impl(self.args) assert "error" not in json_result
def test_duplicate_category(self): category = Category("Sci-fi") db.session.add(category) db.session.commit() self.args["category_name"] = "Sci-fi" json_result = rating_book_request_impl(self.args) assert "error" not in json_result
def test_duplicate_author(self): author = Author("Rafael") db.session.add(author) db.session.commit() self.args['author_name'] = 'Rafael' json_result = rating_book_request_impl(self.args) assert "error" not in json_result
def test_duplicate_author(self): author = Author("Rafael") db.session.add(author) db.session.commit() self.args["author_name"] = "Rafael" json_result = rating_book_request_impl(self.args) assert "error" not in json_result
def test_invalid_under_rating(self): self.args['rating'] = -1 json_result = rating_book_request_impl(self.args) assert "error" in json_result
def test_invalid_book_name(self): self.args['book_name'] = None json_result = rating_book_request_impl(self.args) assert "error" in json_result
def test(self): json_result = rating_book_request_impl(self.args) assert "error" not in json_result
def test_invalid_under_rating(self): self.args["rating"] = -1 json_result = rating_book_request_impl(self.args) assert "error" in json_result
def test_invalid_book_name(self): self.args["book_name"] = None json_result = rating_book_request_impl(self.args) assert "error" in json_result