forked from openlp/openlp
test fix
This commit is contained in:
parent
1d736a58f5
commit
5cb0d2a772
@ -22,6 +22,7 @@
|
|||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
|
from openlp.core.common.path import Path
|
||||||
from openlp.core.common.registry import Registry
|
from openlp.core.common.registry import Registry
|
||||||
from openlp.core.server import Server
|
from openlp.core.server import Server
|
||||||
from tests.helpers.testmixin import TestMixin
|
from tests.helpers.testmixin import TestMixin
|
||||||
@ -83,8 +84,8 @@ class TestServer(TestCase, TestMixin):
|
|||||||
self.server._on_ready_read()
|
self.server._on_ready_read()
|
||||||
|
|
||||||
# THEN: the service will be loaded
|
# THEN: the service will be loaded
|
||||||
assert service_manager.on_load_service_clicked.call_count == 1
|
assert service_manager.load_service.call_count == 1
|
||||||
service_manager.on_load_service_clicked.assert_called_once_with(file_name)
|
service_manager.load_service.assert_called_once_with(Path(file_name))
|
||||||
|
|
||||||
@patch("PyQt5.QtCore.QTextStream")
|
@patch("PyQt5.QtCore.QTextStream")
|
||||||
def test_post_to_server(self, mocked_stream):
|
def test_post_to_server(self, mocked_stream):
|
||||||
|
Loading…
Reference in New Issue
Block a user