diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-04-06 20:05:05 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-04-06 21:58:54 -0700 |
commit | 0e171b5aeb77690ead3bb896be196fdcc5c69a39 (patch) | |
tree | f7512d394f38586a6d3a081e120a623b65f18f87 /python/tests | |
parent | 2e781738937efecbfc527a47ade6c3deaba64247 (diff) | |
download | fatcat-0e171b5aeb77690ead3bb896be196fdcc5c69a39.tar.gz fatcat-0e171b5aeb77690ead3bb896be196fdcc5c69a39.zip |
search container stats: changes to be called from index code path
Eg, allowing injection of more config values
Diffstat (limited to 'python/tests')
-rw-r--r-- | python/tests/web_search.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/python/tests/web_search.py b/python/tests/web_search.py index a7bf7ec7..8df01466 100644 --- a/python/tests/web_search.py +++ b/python/tests/web_search.py @@ -165,6 +165,16 @@ def test_container_stats(app, mocker): ] rv = app.get('/container/issnl/1234-5678/stats.json') assert rv.status_code == 200 + stats = rv.json + assert isinstance(stats['total'], int) + assert isinstance(stats['release_type'], dict) + assert isinstance(stats['preservation']['total'], int) + assert isinstance(stats['preservation']['bright'], int) + assert isinstance(stats['preservation']['dark'], int) + assert isinstance(stats['preservation']['none'], int) rv = app.get('/container/aaaaaaaaaaaaaeiraaaaaaaaam/stats.json') assert rv.status_code == 200 + stats = rv.json + assert isinstance(stats['total'], int) + assert stats['ident'] == "aaaaaaaaaaaaaeiraaaaaaaaam" |