Skip to content

Commit 902e9db

Browse files
committed
catch future meta breakages
1 parent 144e7d6 commit 902e9db

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

clastic/tests/test_meta.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ def ep_method(self):
5959

6060
resp = cl.get('/meta/json/')
6161
assert resp.status_code == 200
62+
resp_data = json.loads(resp.data)
6263

63-
endpoints = [r['endpoint'] for r in json.loads(resp.data)['app']['routes']]
64+
endpoints = [r['endpoint'] for r in resp_data['app']['routes']]
6465
assert endpoints == [{'module_name': 'clastic.tests.test_meta', 'name': 'func_ep'},
6566
{'module_name': 'clastic.tests.test_meta.CallableObj', 'name': 'ep_method'},
6667
{'module_name': 'clastic.tests.test_meta', 'name': 'CallableObj'},
@@ -70,7 +71,9 @@ def ep_method(self):
7071
'name': 'get_file_response'},
7172
{'module_name': 'clastic.meta.MetaApplication', 'name': 'get_main'},
7273
{'module_name': 'builtins', 'name': 'sum'}]
73-
74+
75+
for peripheral, info in resp_data.items():
76+
assert 'exc_content' not in info, f'failed meta context for domain "{peripheral}": {info["exc_content"]}'
7477

7578
def test_resource_redaction():
7679
app = Application(routes=[('/meta', MetaApplication())],

0 commit comments

Comments
 (0)