mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-01-05 04:41:03 -05:00
tests: Fix the dbus test.
This commit is contained in:
parent
48da1b6b14
commit
cb38112160
@ -92,7 +92,7 @@ class ServerConfig:
|
||||
homeserver = attr.ib(type=ParseResult)
|
||||
listen_address = attr.ib(type=Union[IPv4Address, IPv6Address])
|
||||
listen_port = attr.ib(type=int)
|
||||
proxy = attr.ib(type=str)
|
||||
proxy = attr.ib(type=str, default="")
|
||||
ssl = attr.ib(type=bool, default=True)
|
||||
ignore_verification = attr.ib(type=bool, default=False)
|
||||
|
||||
|
@ -2,15 +2,25 @@ import pytest
|
||||
from janus import Queue
|
||||
|
||||
from conftest import faker
|
||||
from pantalaimon.ui import Control, Devices, IdCounter
|
||||
from pantalaimon.ui import Control, IdCounter
|
||||
from pantalaimon.config import ServerConfig
|
||||
|
||||
|
||||
class TestClass(object):
|
||||
def test_server_account_storing(self):
|
||||
users = [(faker.mx_id(), faker.device_id())]
|
||||
def test_server_account_storing(self, panstore):
|
||||
domain = faker.domain_name()
|
||||
|
||||
server_list = [
|
||||
ServerConfig(
|
||||
domain,
|
||||
faker.url("http"),
|
||||
faker.ipv4(),
|
||||
8080,
|
||||
)
|
||||
]
|
||||
|
||||
queue = Queue()
|
||||
counter = IdCounter()
|
||||
control = Control(queue.sync_q, users, counter)
|
||||
control = Control(queue.sync_q, panstore, server_list, counter)
|
||||
|
||||
assert control.ListUsers() == users
|
||||
assert control.ListServers() == {domain: []}
|
||||
|
Loading…
Reference in New Issue
Block a user