mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-09 09:31:04 +00:00
test(tokens-repo): move original token content to json tests
This commit is contained in:
parent
c12dca9d9b
commit
0d748d7ab1
|
@ -19,9 +19,8 @@ from selfprivacy_api.repositories.tokens.exceptions import (
|
||||||
from selfprivacy_api.repositories.tokens.json_tokens_repository import (
|
from selfprivacy_api.repositories.tokens.json_tokens_repository import (
|
||||||
JsonTokensRepository,
|
JsonTokensRepository,
|
||||||
)
|
)
|
||||||
from tests.common import read_json
|
|
||||||
|
|
||||||
from test_tokens_repository import ORIGINAL_TOKEN_CONTENT
|
from tests.common import read_json
|
||||||
from test_tokens_repository import (
|
from test_tokens_repository import (
|
||||||
mock_recovery_key_generate,
|
mock_recovery_key_generate,
|
||||||
mock_generate_token,
|
mock_generate_token,
|
||||||
|
@ -29,6 +28,29 @@ from test_tokens_repository import (
|
||||||
empty_keys,
|
empty_keys,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ORIGINAL_TOKEN_CONTENT = [
|
||||||
|
{
|
||||||
|
"token": "KG9ni-B-CMPk327Zv1qC7YBQaUGaBUcgdkvMvQ2atFI",
|
||||||
|
"name": "primary_token",
|
||||||
|
"date": "2022-07-15 17:41:31.675698",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"token": "3JKgLOtFu6ZHgE4OU-R-VdW47IKpg-YQL0c6n7bol68",
|
||||||
|
"name": "second_token",
|
||||||
|
"date": "2022-07-15 17:41:31.675698Z",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"token": "LYiwFDekvALKTQSjk7vtMQuNP_6wqKuV-9AyMKytI_8",
|
||||||
|
"name": "third_token",
|
||||||
|
"date": "2022-07-15T17:41:31.675698Z",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"token": "dD3CFPcEZvapscgzWb7JZTLog7OMkP7NzJeu2fAazXM",
|
||||||
|
"name": "forth_token",
|
||||||
|
"date": "2022-07-15T17:41:31.675698",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def tokens(mocker, datadir):
|
def tokens(mocker, datadir):
|
||||||
|
|
|
@ -24,29 +24,6 @@ from selfprivacy_api.repositories.tokens.redis_tokens_repository import (
|
||||||
from tests.common import read_json
|
from tests.common import read_json
|
||||||
|
|
||||||
|
|
||||||
ORIGINAL_TOKEN_CONTENT = [
|
|
||||||
{
|
|
||||||
"token": "KG9ni-B-CMPk327Zv1qC7YBQaUGaBUcgdkvMvQ2atFI",
|
|
||||||
"name": "primary_token",
|
|
||||||
"date": "2022-07-15 17:41:31.675698",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"token": "3JKgLOtFu6ZHgE4OU-R-VdW47IKpg-YQL0c6n7bol68",
|
|
||||||
"name": "second_token",
|
|
||||||
"date": "2022-07-15 17:41:31.675698Z",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"token": "LYiwFDekvALKTQSjk7vtMQuNP_6wqKuV-9AyMKytI_8",
|
|
||||||
"name": "third_token",
|
|
||||||
"date": "2022-07-15T17:41:31.675698Z",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"token": "dD3CFPcEZvapscgzWb7JZTLog7OMkP7NzJeu2fAazXM",
|
|
||||||
"name": "forth_token",
|
|
||||||
"date": "2022-07-15T17:41:31.675698",
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
ORIGINAL_DEVICE_NAMES = [
|
ORIGINAL_DEVICE_NAMES = [
|
||||||
"primary_token",
|
"primary_token",
|
||||||
"second_token",
|
"second_token",
|
||||||
|
|
Loading…
Reference in a new issue