aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests/web_search.py
diff options
context:
space:
mode:
authorbnewbold <bnewbold@archive.org>2021-04-08 00:22:33 +0000
committerbnewbold <bnewbold@archive.org>2021-04-08 00:22:33 +0000
commit97280d0a20baa00aa1f8dbd3bec62142ad2ce900 (patch)
tree9320c75d5c19148aba7cd3a0ced0fc200988e6ba /python/tests/web_search.py
parent0b9fc884dad8e3147d10c273725157ba60f48069 (diff)
parent9f110393b90d5b9e95a39b4f83d3e864434dd189 (diff)
downloadfatcat-97280d0a20baa00aa1f8dbd3bec62142ad2ce900.tar.gz
fatcat-97280d0a20baa00aa1f8dbd3bec62142ad2ce900.zip
Merge branch 'bnewbold-es-index-updates' into 'master'
fatcat elasticsearch schema updates See merge request webgroup/fatcat!101
Diffstat (limited to 'python/tests/web_search.py')
-rw-r--r--python/tests/web_search.py10
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"