mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-25 21:41:27 +00:00
test(tokens-repo): break out rest_get_token_info()
This commit is contained in:
parent
f542c1e6c7
commit
7e0e6015cf
|
@ -41,10 +41,14 @@ def assert_original(filename):
|
||||||
assert read_json(filename) == TOKENS_FILE_CONTETS
|
assert read_json(filename) == TOKENS_FILE_CONTETS
|
||||||
|
|
||||||
|
|
||||||
def test_get_tokens_info(authorized_client, tokens_file):
|
def rest_get_tokens_info(client):
|
||||||
response = authorized_client.get("/auth/tokens")
|
response = client.get("/auth/tokens")
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
assert response.json() == [
|
return response.json()
|
||||||
|
|
||||||
|
|
||||||
|
def test_get_tokens_info(authorized_client, tokens_file):
|
||||||
|
assert rest_get_tokens_info(authorized_client) == [
|
||||||
{"name": "test_token", "date": "2022-01-14T08:31:10.789314", "is_caller": True},
|
{"name": "test_token", "date": "2022-01-14T08:31:10.789314", "is_caller": True},
|
||||||
{
|
{
|
||||||
"name": "test_token2",
|
"name": "test_token2",
|
||||||
|
|
Loading…
Reference in a new issue