mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-10 01:49:32 +00:00
Reorganize tests
This commit is contained in:
parent
c92294350f
commit
07f4da2f23
|
@ -186,7 +186,9 @@ def resize_block_mock(mocker):
|
|||
return mock
|
||||
|
||||
|
||||
def test_call_resize_from_block_device(lsblk_singular_mock, resize_block_mock, authorized_client):
|
||||
def test_call_resize_from_block_device(
|
||||
lsblk_singular_mock, resize_block_mock, authorized_client
|
||||
):
|
||||
block_device = BlockDevice(json.loads(VOLUME_LSBLK_OUTPUT)["blockdevices"][0])
|
||||
block_device.resize()
|
||||
assert resize_block_mock.call_count == 1
|
||||
|
@ -223,7 +225,9 @@ def test_get_stats_from_block_device(lsblk_singular_mock, authorized_client):
|
|||
]
|
||||
|
||||
|
||||
def test_mount_block_device(lsblk_singular_mock, only_root_in_userdata, authorized_client):
|
||||
def test_mount_block_device(
|
||||
lsblk_singular_mock, only_root_in_userdata, authorized_client
|
||||
):
|
||||
block_device = BlockDevice(json.loads(SINGLE_LSBLK_OUTPUT)["blockdevices"][0])
|
||||
result = block_device.mount()
|
||||
assert result is False
|
||||
|
@ -270,7 +274,9 @@ def test_mount_block_device_when_undefined(
|
|||
)
|
||||
|
||||
|
||||
def test_unmount_block_device(lsblk_singular_mock, only_root_in_userdata, authorized_client):
|
||||
def test_unmount_block_device(
|
||||
lsblk_singular_mock, only_root_in_userdata, authorized_client
|
||||
):
|
||||
block_device = BlockDevice(json.loads(SINGLE_LSBLK_OUTPUT)["blockdevices"][0])
|
||||
result = block_device.unmount()
|
||||
assert result is True
|
||||
|
|
|
@ -124,6 +124,7 @@ def mock_dkim_key(mocker):
|
|||
autospec=True,
|
||||
return_value="I am a DKIM key",
|
||||
)
|
||||
return mock
|
||||
|
||||
|
||||
API_PYTHON_VERSION_INFO = """
|
||||
|
@ -137,7 +138,7 @@ def test_graphql_get_python_version_wrong_auth(
|
|||
wrong_auth_client, mock_subprocess_check_output
|
||||
):
|
||||
"""Test wrong auth"""
|
||||
response = wrong_auth_client.get(
|
||||
response = wrong_auth_client.post(
|
||||
"/graphql",
|
||||
json={
|
||||
"query": generate_system_query([API_PYTHON_VERSION_INFO]),
|
||||
|
@ -149,7 +150,7 @@ def test_graphql_get_python_version_wrong_auth(
|
|||
|
||||
def test_graphql_get_python_version(authorized_client, mock_subprocess_check_output):
|
||||
"""Test get python version"""
|
||||
response = authorized_client.get(
|
||||
response = authorized_client.post(
|
||||
"/graphql",
|
||||
json={
|
||||
"query": generate_system_query([API_PYTHON_VERSION_INFO]),
|
||||
|
@ -173,7 +174,7 @@ def test_graphql_get_system_version_unauthorized(
|
|||
wrong_auth_client, mock_subprocess_check_output
|
||||
):
|
||||
"""Test wrong auth"""
|
||||
response = wrong_auth_client.get(
|
||||
response = wrong_auth_client.post(
|
||||
"/graphql",
|
||||
json={
|
||||
"query": generate_system_query([API_SYSTEM_VERSION_INFO]),
|
||||
|
@ -188,7 +189,7 @@ def test_graphql_get_system_version_unauthorized(
|
|||
|
||||
def test_graphql_get_system_version(authorized_client, mock_subprocess_check_output):
|
||||
"""Test get system version"""
|
||||
response = authorized_client.get(
|
||||
response = authorized_client.post(
|
||||
"/graphql",
|
||||
json={
|
||||
"query": generate_system_query([API_SYSTEM_VERSION_INFO]),
|
||||
|
@ -209,7 +210,7 @@ domainInfo {
|
|||
hostname
|
||||
provider
|
||||
requiredDnsRecords {
|
||||
type
|
||||
recordType
|
||||
name
|
||||
content
|
||||
ttl
|
||||
|
@ -219,14 +220,14 @@ domainInfo {
|
|||
"""
|
||||
|
||||
|
||||
def dns_record(type="A", name="test.tld", content=None, ttl=3600, priority=None):
|
||||
def dns_record(record_type="A", name="test-domain.tld", content=None, ttl=3600, priority=None):
|
||||
if content is None:
|
||||
if type == "A":
|
||||
if record_type == "A":
|
||||
content = "157.90.247.192"
|
||||
elif type == "AAAA":
|
||||
elif record_type == "AAAA":
|
||||
content = "fe80::9400:ff:fef1:34ae"
|
||||
return {
|
||||
"type": type,
|
||||
"recordType": record_type,
|
||||
"name": name,
|
||||
"content": content,
|
||||
"ttl": ttl,
|
||||
|
@ -237,7 +238,7 @@ def dns_record(type="A", name="test.tld", content=None, ttl=3600, priority=None)
|
|||
def is_dns_record_in_array(records, dns_record) -> bool:
|
||||
for record in records:
|
||||
if (
|
||||
record["type"] == dns_record["type"]
|
||||
record["recordType"] == dns_record["recordType"]
|
||||
and record["name"] == dns_record["name"]
|
||||
and record["content"] == dns_record["content"]
|
||||
and record["ttl"] == dns_record["ttl"]
|
||||
|
@ -248,10 +249,10 @@ def is_dns_record_in_array(records, dns_record) -> bool:
|
|||
|
||||
|
||||
def test_graphql_get_domain(
|
||||
authorized_client, domain_file, mock_get_ip4, mock_get_ip6, turned_on
|
||||
authorized_client, domain_file, mock_get_ip4, mock_get_ip6, turned_on, mock_dkim_key
|
||||
):
|
||||
"""Test get domain"""
|
||||
response = authorized_client.get(
|
||||
response = authorized_client.post(
|
||||
"/graphql",
|
||||
json={
|
||||
"query": generate_system_query([API_GET_DOMAIN_INFO]),
|
||||
|
@ -263,53 +264,53 @@ def test_graphql_get_domain(
|
|||
assert (
|
||||
response.json()["data"]["system"]["domainInfo"]["hostname"] == "test-instance"
|
||||
)
|
||||
assert response.json()["data"]["system"]["domainInfo"]["provider"] == "HETZNER"
|
||||
assert response.json()["data"]["system"]["domainInfo"]["provider"] == "CLOUDFLARE"
|
||||
dns_records = response.json()["data"]["system"]["domainInfo"]["requiredDnsRecords"]
|
||||
assert is_dns_record_in_array(dns_records, dns_record())
|
||||
assert is_dns_record_in_array(dns_records, dns_record(type="AAAA"))
|
||||
assert is_dns_record_in_array(dns_records, dns_record(name="api.test.tld"))
|
||||
assert is_dns_record_in_array(dns_records, dns_record(record_type="AAAA"))
|
||||
assert is_dns_record_in_array(dns_records, dns_record(name="api"))
|
||||
assert is_dns_record_in_array(
|
||||
dns_records, dns_record(name="api.test.tld", type="AAAA")
|
||||
dns_records, dns_record(name="api", record_type="AAAA")
|
||||
)
|
||||
assert is_dns_record_in_array(dns_records, dns_record(name="cloud.test.tld"))
|
||||
assert is_dns_record_in_array(dns_records, dns_record(name="cloud"))
|
||||
assert is_dns_record_in_array(
|
||||
dns_records, dns_record(name="cloud.test.tld", type="AAAA")
|
||||
dns_records, dns_record(name="cloud", record_type="AAAA")
|
||||
)
|
||||
assert is_dns_record_in_array(dns_records, dns_record(name="git.test.tld"))
|
||||
assert is_dns_record_in_array(dns_records, dns_record(name="git"))
|
||||
assert is_dns_record_in_array(
|
||||
dns_records, dns_record(name="git.test.tld", type="AAAA")
|
||||
dns_records, dns_record(name="git", record_type="AAAA")
|
||||
)
|
||||
assert is_dns_record_in_array(dns_records, dns_record(name="meet.test.tld"))
|
||||
assert is_dns_record_in_array(dns_records, dns_record(name="meet"))
|
||||
assert is_dns_record_in_array(
|
||||
dns_records, dns_record(name="meet.test.tld", type="AAAA")
|
||||
dns_records, dns_record(name="meet", record_type="AAAA")
|
||||
)
|
||||
assert is_dns_record_in_array(dns_records, dns_record(name="password.test.tld"))
|
||||
assert is_dns_record_in_array(dns_records, dns_record(name="password"))
|
||||
assert is_dns_record_in_array(
|
||||
dns_records, dns_record(name="password.test.tld", type="AAAA")
|
||||
dns_records, dns_record(name="password", record_type="AAAA")
|
||||
)
|
||||
assert is_dns_record_in_array(dns_records, dns_record(name="social.test.tld"))
|
||||
assert is_dns_record_in_array(dns_records, dns_record(name="social"))
|
||||
assert is_dns_record_in_array(
|
||||
dns_records, dns_record(name="social.test.tld", type="AAAA")
|
||||
dns_records, dns_record(name="social", record_type="AAAA")
|
||||
)
|
||||
assert is_dns_record_in_array(dns_records, dns_record(name="vpn.test.tld"))
|
||||
assert is_dns_record_in_array(dns_records, dns_record(name="vpn"))
|
||||
assert is_dns_record_in_array(
|
||||
dns_records, dns_record(name="vpn.test.tld", type="AAAA")
|
||||
dns_records, dns_record(name="vpn", record_type="AAAA")
|
||||
)
|
||||
assert is_dns_record_in_array(
|
||||
dns_records,
|
||||
dns_record(name="test.tld", type="MX", content="test.tld", priority=10),
|
||||
dns_record(name="test-domain.tld", record_type="MX", content="test-domain.tld", priority=10),
|
||||
)
|
||||
assert is_dns_record_in_array(
|
||||
dns_records,
|
||||
dns_record(
|
||||
name="_dmarc.test.tld", type="TXT", content="v=DMARC1; p=none", ttl=18000
|
||||
name="_dmarc", record_type="TXT", content="v=DMARC1; p=none", ttl=18000
|
||||
),
|
||||
)
|
||||
assert is_dns_record_in_array(
|
||||
dns_records,
|
||||
dns_record(
|
||||
name="test.tld",
|
||||
type="TXT",
|
||||
name="test-domain.tld",
|
||||
record_type="TXT",
|
||||
content="v=spf1 a mx ip4:157.90.247.192 -all",
|
||||
ttl=18000,
|
||||
),
|
||||
|
@ -317,8 +318,8 @@ def test_graphql_get_domain(
|
|||
assert is_dns_record_in_array(
|
||||
dns_records,
|
||||
dns_record(
|
||||
name="selector._domainkey.test.tld",
|
||||
type="TXT",
|
||||
name="selector._domainkey",
|
||||
record_type="TXT",
|
||||
content="I am a DKIM key",
|
||||
ttl=18000,
|
||||
),
|
||||
|
@ -334,7 +335,7 @@ settings {
|
|||
|
||||
def test_graphql_get_timezone_unauthorized(client, turned_on):
|
||||
"""Test get timezone without auth"""
|
||||
response = client.get(
|
||||
response = client.post(
|
||||
"/graphql",
|
||||
json={
|
||||
"query": generate_system_query([API_GET_TIMEZONE]),
|
||||
|
@ -346,7 +347,7 @@ def test_graphql_get_timezone_unauthorized(client, turned_on):
|
|||
|
||||
def test_graphql_get_timezone(authorized_client, turned_on):
|
||||
"""Test get timezone"""
|
||||
response = authorized_client.get(
|
||||
response = authorized_client.post(
|
||||
"/graphql",
|
||||
json={
|
||||
"query": generate_system_query([API_GET_TIMEZONE]),
|
||||
|
@ -359,7 +360,7 @@ def test_graphql_get_timezone(authorized_client, turned_on):
|
|||
|
||||
def test_graphql_get_timezone_on_undefined(authorized_client, undefined_config):
|
||||
"""Test get timezone when none is defined in config"""
|
||||
response = authorized_client.get(
|
||||
response = authorized_client.post(
|
||||
"/graphql",
|
||||
json={
|
||||
"query": generate_system_query([API_GET_TIMEZONE]),
|
||||
|
@ -484,7 +485,7 @@ def test_graphql_change_timezone_with_invalid_timezone(authorized_client, turned
|
|||
API_GET_AUTO_UPGRADE_SETTINGS_QUERY = """
|
||||
settings {
|
||||
autoUpgrade {
|
||||
enableAutoUpgrade
|
||||
enable
|
||||
allowReboot
|
||||
}
|
||||
}
|
||||
|
@ -493,10 +494,10 @@ settings {
|
|||
|
||||
def test_graphql_get_auto_upgrade_unauthorized(client, turned_on):
|
||||
"""Test get auto upgrade settings without auth"""
|
||||
response = client.get(
|
||||
response = client.post(
|
||||
"/graphql",
|
||||
json={
|
||||
"query": API_GET_AUTO_UPGRADE_SETTINGS_QUERY,
|
||||
"query": generate_system_query([API_GET_AUTO_UPGRADE_SETTINGS_QUERY]),
|
||||
},
|
||||
)
|
||||
assert response.status_code == 200
|
||||
|
@ -505,66 +506,66 @@ def test_graphql_get_auto_upgrade_unauthorized(client, turned_on):
|
|||
|
||||
def test_graphql_get_auto_upgrade(authorized_client, turned_on):
|
||||
"""Test get auto upgrade settings"""
|
||||
response = authorized_client.get(
|
||||
response = authorized_client.post(
|
||||
"/graphql",
|
||||
json={
|
||||
"query": API_GET_AUTO_UPGRADE_SETTINGS_QUERY,
|
||||
"query": generate_system_query([API_GET_AUTO_UPGRADE_SETTINGS_QUERY]),
|
||||
},
|
||||
)
|
||||
assert response.status_code == 200
|
||||
assert response.json().get("data") is not None
|
||||
assert (
|
||||
response.json()["data"]["settings"]["autoUpgrade"]["enableAutoUpgrade"] is True
|
||||
response.json()["data"]["system"]["settings"]["autoUpgrade"]["enable"] is True
|
||||
)
|
||||
assert response.json()["data"]["settings"]["autoUpgrade"]["allowReboot"] is True
|
||||
assert response.json()["data"]["system"]["settings"]["autoUpgrade"]["allowReboot"] is True
|
||||
|
||||
|
||||
def test_graphql_get_auto_upgrade_on_undefined(authorized_client, undefined_config):
|
||||
"""Test get auto upgrade settings when none is defined in config"""
|
||||
response = authorized_client.get(
|
||||
response = authorized_client.post(
|
||||
"/graphql",
|
||||
json={
|
||||
"query": API_GET_AUTO_UPGRADE_SETTINGS_QUERY,
|
||||
"query": generate_system_query([API_GET_AUTO_UPGRADE_SETTINGS_QUERY]),
|
||||
},
|
||||
)
|
||||
assert response.status_code == 200
|
||||
assert response.json().get("data") is not None
|
||||
assert (
|
||||
response.json()["data"]["settings"]["autoUpgrade"]["enableAutoUpgrade"] is True
|
||||
response.json()["data"]["system"]["settings"]["autoUpgrade"]["enable"] is True
|
||||
)
|
||||
assert response.json()["data"]["settings"]["autoUpgrade"]["allowReboot"] is False
|
||||
assert response.json()["data"]["system"]["settings"]["autoUpgrade"]["allowReboot"] is False
|
||||
|
||||
|
||||
def test_graphql_get_auto_upgrade_without_vlaues(authorized_client, no_values):
|
||||
"""Test get auto upgrade settings without values"""
|
||||
response = authorized_client.get(
|
||||
response = authorized_client.post(
|
||||
"/graphql",
|
||||
json={
|
||||
"query": API_GET_AUTO_UPGRADE_SETTINGS_QUERY,
|
||||
"query": generate_system_query([API_GET_AUTO_UPGRADE_SETTINGS_QUERY]),
|
||||
},
|
||||
)
|
||||
assert response.status_code == 200
|
||||
assert response.json().get("data") is not None
|
||||
assert (
|
||||
response.json()["data"]["settings"]["autoUpgrade"]["enableAutoUpgrade"] is True
|
||||
response.json()["data"]["system"]["settings"]["autoUpgrade"]["enable"] is True
|
||||
)
|
||||
assert response.json()["data"]["settings"]["autoUpgrade"]["allowReboot"] is False
|
||||
assert response.json()["data"]["system"]["settings"]["autoUpgrade"]["allowReboot"] is False
|
||||
|
||||
|
||||
def test_graphql_get_auto_upgrade_turned_off(authorized_client, turned_off):
|
||||
"""Test get auto upgrade settings when turned off"""
|
||||
response = authorized_client.get(
|
||||
response = authorized_client.post(
|
||||
"/graphql",
|
||||
json={
|
||||
"query": API_GET_AUTO_UPGRADE_SETTINGS_QUERY,
|
||||
"query": generate_system_query([API_GET_AUTO_UPGRADE_SETTINGS_QUERY]),
|
||||
},
|
||||
)
|
||||
assert response.status_code == 200
|
||||
assert response.json().get("data") is not None
|
||||
assert (
|
||||
response.json()["data"]["settings"]["autoUpgrade"]["enableAutoUpgrade"] is False
|
||||
response.json()["data"]["system"]["settings"]["autoUpgrade"]["enable"] is False
|
||||
)
|
||||
assert response.json()["data"]["settings"]["autoUpgrade"]["allowReboot"] is False
|
||||
assert response.json()["data"]["system"]["settings"]["autoUpgrade"]["allowReboot"] is False
|
||||
|
||||
|
||||
API_CHANGE_AUTO_UPGRADE_SETTINGS = """
|
||||
|
@ -805,7 +806,7 @@ def test_graphql_change_auto_upgrade_with_empty_input(authorized_client, turned_
|
|||
|
||||
|
||||
API_PULL_SYSTEM_CONFIGURATION_MUTATION = """
|
||||
mutation testPullSystemConfiguration() {
|
||||
mutation testPullSystemConfiguration {
|
||||
pullRepositoryChanges {
|
||||
success
|
||||
message
|
|
@ -33,7 +33,7 @@
|
|||
},
|
||||
"username": "tester",
|
||||
"gitea": {
|
||||
"enable": false
|
||||
"enable": true
|
||||
},
|
||||
"ocserv": {
|
||||
"enable": true
|
||||
|
|
|
@ -30,3 +30,21 @@ def test_jobs(authorized_client, jobs_file, shared_datadir):
|
|||
)
|
||||
|
||||
assert jobs.get_jobs() == [test_job]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_subprocess_run(mocker):
|
||||
mock = mocker.patch("subprocess.run", autospec=True)
|
||||
return mock
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_shutil_move(mocker):
|
||||
mock = mocker.patch("shutil.move", autospec=True)
|
||||
return mock
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_shutil_chown(mocker):
|
||||
mock = mocker.patch("shutil.chown", autospec=True)
|
||||
return mock
|
||||
|
|
1
tests/test_rest_endpoints/data/jobs.json
Normal file
1
tests/test_rest_endpoints/data/jobs.json
Normal file
|
@ -0,0 +1 @@
|
|||
{}
|
14
tests/test_rest_endpoints/data/tokens.json
Normal file
14
tests/test_rest_endpoints/data/tokens.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"tokens": [
|
||||
{
|
||||
"token": "TEST_TOKEN",
|
||||
"name": "test_token",
|
||||
"date": "2022-01-14 08:31:10.789314"
|
||||
},
|
||||
{
|
||||
"token": "TEST_TOKEN2",
|
||||
"name": "test_token2",
|
||||
"date": "2022-01-14 08:31:10.789314"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -12,68 +12,78 @@ def call_args_asserts(mocked_object):
|
|||
assert mocked_object.call_count == 7
|
||||
assert mocked_object.call_args_list[0][0][0] == [
|
||||
"systemctl",
|
||||
"status",
|
||||
"show",
|
||||
"dovecot2.service",
|
||||
]
|
||||
assert mocked_object.call_args_list[1][0][0] == [
|
||||
"systemctl",
|
||||
"status",
|
||||
"show",
|
||||
"postfix.service",
|
||||
]
|
||||
assert mocked_object.call_args_list[2][0][0] == [
|
||||
"systemctl",
|
||||
"status",
|
||||
"show",
|
||||
"vaultwarden.service",
|
||||
]
|
||||
assert mocked_object.call_args_list[3][0][0] == [
|
||||
"systemctl",
|
||||
"status",
|
||||
"show",
|
||||
"gitea.service",
|
||||
]
|
||||
assert mocked_object.call_args_list[4][0][0] == [
|
||||
"systemctl",
|
||||
"status",
|
||||
"show",
|
||||
"phpfpm-nextcloud.service",
|
||||
]
|
||||
assert mocked_object.call_args_list[5][0][0] == [
|
||||
"systemctl",
|
||||
"status",
|
||||
"show",
|
||||
"ocserv.service",
|
||||
]
|
||||
assert mocked_object.call_args_list[6][0][0] == [
|
||||
"systemctl",
|
||||
"status",
|
||||
"show",
|
||||
"pleroma.service",
|
||||
]
|
||||
|
||||
|
||||
class ProcessMock:
|
||||
"""Mock subprocess.Popen"""
|
||||
SUCCESSFUL_STATUS = b"""
|
||||
Type=oneshot
|
||||
ExitType=main
|
||||
Restart=no
|
||||
NotifyAccess=none
|
||||
RestartUSec=100ms
|
||||
LoadState=loaded
|
||||
ActiveState=active
|
||||
FreezerState=running
|
||||
SubState=exited
|
||||
"""
|
||||
|
||||
def __init__(self, args, **kwargs):
|
||||
self.args = args
|
||||
self.kwargs = kwargs
|
||||
|
||||
def communicate():
|
||||
return (b"", None)
|
||||
|
||||
returncode = 0
|
||||
|
||||
|
||||
class BrokenServiceMock(ProcessMock):
|
||||
returncode = 3
|
||||
FAILED_STATUS = b"""
|
||||
Type=oneshot
|
||||
ExitType=main
|
||||
Restart=no
|
||||
NotifyAccess=none
|
||||
RestartUSec=100ms
|
||||
LoadState=loaded
|
||||
ActiveState=failed
|
||||
FreezerState=running
|
||||
SubState=exited
|
||||
"""
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_subproccess_popen(mocker):
|
||||
mock = mocker.patch("subprocess.Popen", autospec=True, return_value=ProcessMock)
|
||||
mock = mocker.patch(
|
||||
"subprocess.check_output", autospec=True, return_value=SUCCESSFUL_STATUS
|
||||
)
|
||||
return mock
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_broken_service(mocker):
|
||||
mock = mocker.patch(
|
||||
"subprocess.Popen", autospec=True, return_value=BrokenServiceMock
|
||||
"subprocess.check_output", autospec=True, return_value=FAILED_STATUS
|
||||
)
|
||||
return mock
|
||||
|
||||
|
@ -116,13 +126,13 @@ def test_no_dkim_key(authorized_client, mock_broken_service):
|
|||
response = authorized_client.get("/services/status")
|
||||
assert response.status_code == 200
|
||||
assert response.json() == {
|
||||
"imap": 3,
|
||||
"smtp": 3,
|
||||
"imap": 1,
|
||||
"smtp": 1,
|
||||
"http": 0,
|
||||
"bitwarden": 3,
|
||||
"gitea": 3,
|
||||
"nextcloud": 3,
|
||||
"ocserv": 3,
|
||||
"pleroma": 3,
|
||||
"bitwarden": 1,
|
||||
"gitea": 1,
|
||||
"nextcloud": 1,
|
||||
"ocserv": 1,
|
||||
"pleroma": 1,
|
||||
}
|
||||
call_args_asserts(mock_broken_service)
|
|
@ -2,12 +2,10 @@
|
|||
# pylint: disable=unused-argument
|
||||
# pylint: disable=missing-function-docstring
|
||||
import datetime
|
||||
import json
|
||||
import re
|
||||
import pytest
|
||||
from mnemonic import Mnemonic
|
||||
|
||||
from .common import read_json, write_json
|
||||
from tests.common import read_json, write_json
|
||||
|
||||
|
||||
TOKENS_FILE_CONTETS = {
|
Loading…
Reference in a new issue