mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-18 00:19:15 +00:00
test(services): test mailserver dkim quirk
This commit is contained in:
parent
fb15ef9388
commit
adcdbfb368
|
@ -9,12 +9,15 @@ from selfprivacy_api.utils.waitloop import wait_until_true
|
|||
|
||||
from selfprivacy_api.services.bitwarden import Bitwarden
|
||||
from selfprivacy_api.services.pleroma import Pleroma
|
||||
from selfprivacy_api.services.mailserver import MailServer
|
||||
from selfprivacy_api.services.owned_path import OwnedPath
|
||||
from selfprivacy_api.services.generic_service_mover import FolderMoveNames
|
||||
|
||||
from selfprivacy_api.services.test_service import DummyService
|
||||
from selfprivacy_api.services.service import Service, ServiceStatus, StoppedService
|
||||
|
||||
from tests.test_dkim import domain_file, dkim_file, no_dkim_file
|
||||
|
||||
|
||||
def test_unimplemented_folders_raises():
|
||||
with raises(NotImplementedError):
|
||||
|
@ -145,3 +148,13 @@ def test_enabling_disabling_writes_json(
|
|||
dummy_service.disable()
|
||||
with ReadUserData() as data:
|
||||
assert data[dummy_service.get_id()]["enable"] is False
|
||||
|
||||
|
||||
# more detailed testing of this is in test_graphql/test_system.py
|
||||
def test_mailserver_with_dkim_returns_some_dns(dkim_file):
|
||||
records = MailServer().get_dns_records()
|
||||
assert len(records) > 0
|
||||
|
||||
|
||||
def test_mailserver_with_no_dkim_returns_no_dns(no_dkim_file):
|
||||
assert MailServer().get_dns_records() == []
|
||||
|
|
Loading…
Reference in a new issue