tests (unit/webrtc,XEP-0176, XEP-0234): Fix tests and add webrtc file transfer tests:
fix 441
This commit is contained in:
parent
e8fb0a8a28
commit
27b66b3fb2
1 changed files with 197 additions and 5 deletions
|
|
@ -39,7 +39,7 @@ def storage():
|
|||
return AsyncMock()
|
||||
|
||||
|
||||
class MockSAT(LiberviaBackend):
|
||||
class MockLiberviaBackend(LiberviaBackend):
|
||||
|
||||
def __init__(self, bridge, storage):
|
||||
self._cb_map = {}
|
||||
|
|
@ -76,6 +76,11 @@ class MockSAT(LiberviaBackend):
|
|||
def clear_test_config(self):
|
||||
self._test_config.clear()
|
||||
|
||||
def register_namespace(self, short_name, namespace):
|
||||
# Plugin classes may be instantiated several times in tests, so we do nothing in
|
||||
# this method to avoid ConflictError.
|
||||
pass
|
||||
|
||||
@contextmanager
|
||||
def use_option_and_reload(self, section, name, value):
|
||||
self.set_test_config(section, name, value)
|
||||
|
|
@ -104,7 +109,7 @@ class MockSAT(LiberviaBackend):
|
|||
|
||||
@fixture(scope="session")
|
||||
def host(bridge, storage):
|
||||
host = MockSAT(bridge=bridge, storage=storage)
|
||||
host = MockLiberviaBackend(bridge=bridge, storage=storage)
|
||||
return host
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue