Commit 9a0af7be authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Added a log entry for code_args to debug.

parent 14ef76d8
Pipeline #67479 canceled with stages
in 7 minutes and 11 seconds
......@@ -232,6 +232,8 @@ class RepoCalcsResource(Resource):
code_args = dict(request.args)
if 'statistics' in code_args:
del(code_args['statistics'])
import json
utils.get_logger(__name__).info('create code snippets', code_args=json.dumps(code_args))
results['curl'] = query_api_curl('archive', 'query', query_string=code_args)
results['python'] = query_api_python('archive', 'query', query_string=code_args)
......
......@@ -1076,13 +1076,11 @@ class TestRepo():
assert data['pagination']['total'] > 0
def test_get_code_from_query(self, api, example_elastic_calcs, test_user_auth):
rv = api.get('/repo/?per_page=10', headers=test_user_auth)
rv = api.get('/repo/?code_name=VASP', headers=test_user_auth)
assert rv.status_code == 200
data = json.loads(rv.data)
assert data['python'] is not None
assert data['curl'] is not None
# exec does not seem to work
# exec(data['python'])
class TestEditRepo():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment