test(tokens-repo): use rest token info in token deletion test

This commit is contained in:
Houkime 2022-12-28 15:26:42 +00:00 committed by Inex Code
parent 7e0e6015cf
commit 270e569af2

View file

@ -74,15 +74,9 @@ def test_delete_token(authorized_client, tokens_file):
"/auth/tokens", json={"token_name": "test_token2"} "/auth/tokens", json={"token_name": "test_token2"}
) )
assert response.status_code == 200 assert response.status_code == 200
assert read_json(tokens_file) == { assert rest_get_tokens_info(authorized_client) == [
"tokens": [ {"name": "test_token", "date": "2022-01-14T08:31:10.789314", "is_caller": True}
{ ]
"token": "TEST_TOKEN",
"name": "test_token",
"date": "2022-01-14 08:31:10.789314",
}
]
}
def test_delete_self_token(authorized_client, tokens_file): def test_delete_self_token(authorized_client, tokens_file):