##// END OF EJS Templates
cleanups: typing + whitespaces
super-admin -
r5101:2d193aa6 default
parent child Browse files
Show More
@@ -83,10 +83,14 b' def build_data(apikey, method, **kw):'
83 83 })
84 84
85 85
86 def api_call(app, params, status=None):
86 def api_call(app, params, status=None, assert_no_error=False):
87 87 response = app.post(
88 88 API_URL, content_type='application/json', params=params, status=status,
89 89 headers=[('Content-Type', 'application/json')])
90 if assert_no_error:
91 err_resp = response.json.get('error')
92 if err_resp:
93 raise AssertionError(f'ERROR in response: {err_resp}')
90 94 return response
91 95
92 96
@@ -62,7 +62,7 b' def safe_float(val, default=None) -> flo'
62 62 return val
63 63
64 64
65 def base64_to_str(text) -> str:
65 def base64_to_str(text: str | bytes) -> str:
66 66 return safe_str(base64.encodebytes(safe_bytes(text))).strip()
67 67
68 68
@@ -1,4 +1,3 b''
1
2 1 # Copyright (C) 2010-2023 RhodeCode GmbH
3 2 #
4 3 # This program is free software: you can redistribute it and/or modify
General Comments 0
You need to be logged in to leave comments. Login now