* Adding some safey into the mock-client tester so that it doesn't just explode in pipelines
This commit is contained in:
parent
7c8bc8b4fc
commit
f094ab49de
@ -16,8 +16,11 @@ def login() -> (Request, str):
|
|||||||
200
|
200
|
||||||
)
|
)
|
||||||
response = req.fire()
|
response = req.fire()
|
||||||
jwt = response.json().get('jwt')
|
try:
|
||||||
return (req, jwt)
|
jwt = response.json().get('jwt')
|
||||||
|
return (req, jwt)
|
||||||
|
except:
|
||||||
|
return (req, None)
|
||||||
|
|
||||||
def make_channel(url: str, id: int, jwt: str) -> (Request, int):
|
def make_channel(url: str, id: int, jwt: str) -> (Request, int):
|
||||||
# making a text channel
|
# making a text channel
|
||||||
@ -89,6 +92,7 @@ if __name__ == '__main__':
|
|||||||
login_req, jwt = login()
|
login_req, jwt = login()
|
||||||
if jwt is None:
|
if jwt is None:
|
||||||
print('Unable to /login - stopping now to avoid pointless failure')
|
print('Unable to /login - stopping now to avoid pointless failure')
|
||||||
|
req.show_response()
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
admin.jwt = jwt
|
admin.jwt = jwt
|
||||||
|
Loading…
Reference in New Issue
Block a user