mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-05 11:03:12 +00:00
test(tokens-repo): delete get new device key standalone test
we can only see if device key is valid by using it or deleting it. another test does it
This commit is contained in:
parent
6eb5800e4e
commit
102d6b1c5c
|
@ -233,24 +233,6 @@ def test_graphql_get_new_device_auth_key_unauthorized(client, tokens_file):
|
|||
assert_empty(response)
|
||||
|
||||
|
||||
def test_graphql_get_new_device_auth_key(authorized_client, tokens_file):
|
||||
response = authorized_client.post(
|
||||
"/graphql",
|
||||
json={"query": NEW_DEVICE_KEY_MUTATION},
|
||||
)
|
||||
assert_ok(response, "getNewDeviceApiKey")
|
||||
|
||||
assert (
|
||||
response.json()["data"]["getNewDeviceApiKey"]["key"].split(" ").__len__() == 12
|
||||
)
|
||||
token = (
|
||||
Mnemonic(language="english")
|
||||
.to_entropy(response.json()["data"]["getNewDeviceApiKey"]["key"])
|
||||
.hex()
|
||||
)
|
||||
assert read_json(tokens_file)["new_device"]["token"] == token
|
||||
|
||||
|
||||
INVALIDATE_NEW_DEVICE_KEY_MUTATION = """
|
||||
mutation InvalidateNewDeviceKey {
|
||||
invalidateNewDeviceApiKey {
|
||||
|
|
Loading…
Reference in a new issue