diff --git a/test.py b/test.py new file mode 100644 index 0000000..168addd --- /dev/null +++ b/test.py @@ -0,0 +1,11 @@ +from calibrestekje import Book, Publisher, init_session + +session = init_session("sqlite:///metadata.db") + +publisher = (session.query(Publisher) + .filter(Publisher.name == "MIT Press").one()) + +books = (session.query(Book) + .filter(Book.publishers.contains(publisher))) + +print(f"Books published by MIT Press: {books.count()}") \ No newline at end of file