from sqlalchemy import select from sqlalchemy.exc import IntegrityError import pytest from the_works.models import Genre class TestIntGenreRead: """Integrated tests for reading all records.""" def test_records_read(self, client, db): """test reading records""" response = client.get("/genre/all", follow_redirects=True) # good status code assert response.status_code == 200 # two records returned assert response.data.count(b'