diff options
author | HombreLaser <buran@silosneeded.com> | 2024-03-13 19:53:36 -0600 |
---|---|---|
committer | HombreLaser <buran@silosneeded.com> | 2024-03-13 19:53:36 -0600 |
commit | d4d62c6efb5f22c4a935a0a5feb6ec13b7c82f2b (patch) | |
tree | 997eebbf9918b53478226a361c6b96141064fc3b /tests/test_search.py | |
parent | 2a14f9f516316bfae2c69ce178262c4554f4b9fe (diff) |
Add missing tests
Diffstat (limited to 'tests/test_search.py')
-rw-r--r-- | tests/test_search.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/test_search.py b/tests/test_search.py index ecdc550..f126f7e 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -1,4 +1,14 @@ +from src.program import Program + + def test_search(capsys, search_program): search_program.run() - assert capsys.readouterr()[0] == "('1919', 'Ten Days that Shook the World', 'John Reed')\n"
\ No newline at end of file + assert capsys.readouterr()[0] == "('1919', 'Ten Days that Shook the World', 'John Reed')\n" + + +def test_failed_search(capsys): + Program(args=['-f', './tests/test_table.csv', '-c', + 'search', "This book isn't on the table"]).run() + + assert capsys.readouterr()[0] == 'Not found!\n' |