Skip to content
Snippets Groups Projects
Commit 7450c019 authored by inso's avatar inso
Browse files

Change the mock instanciation location

parent 662cb785
No related branches found
No related tags found
No related merge requests found
...@@ -62,6 +62,8 @@ class TestCertificationDialog(unittest.TestCase): ...@@ -62,6 +62,8 @@ class TestCertificationDialog(unittest.TestCase):
asyncio.set_event_loop(None) asyncio.set_event_loop(None)
def test_certification_init_community(self): def test_certification_init_community(self):
mock = init_new_community.get_mock()
logging.debug(mock.pretend_url)
certification_dialog = CertificationDialog(self.application, certification_dialog = CertificationDialog(self.application,
self.account, self.account,
self.password_asker) self.password_asker)
...@@ -77,8 +79,6 @@ class TestCertificationDialog(unittest.TestCase): ...@@ -77,8 +79,6 @@ class TestCertificationDialog(unittest.TestCase):
@asyncio.coroutine @asyncio.coroutine
def exec_test(): def exec_test():
mock = init_new_community.get_mock()
logging.debug(mock.pretend_url)
yield from asyncio.sleep(1) yield from asyncio.sleep(1)
self.network_manager.set_mock_path(mock.pretend_url) self.network_manager.set_mock_path(mock.pretend_url)
self.assertEqual(certification_dialog.button_box.button(QDialogButtonBox.Ok).text(), "&Ok") self.assertEqual(certification_dialog.button_box.button(QDialogButtonBox.Ok).text(), "&Ok")
......
...@@ -42,6 +42,8 @@ class ProcessAddCommunity(unittest.TestCase): ...@@ -42,6 +42,8 @@ class ProcessAddCommunity(unittest.TestCase):
asyncio.set_event_loop(None) asyncio.set_event_loop(None)
def test_add_community_empty_blockchain(self): def test_add_community_empty_blockchain(self):
mock = new_blockchain.get_mock()
logging.debug(mock.pretend_url)
process_community = ProcessConfigureCommunity(self.application, process_community = ProcessConfigureCommunity(self.application,
self.account, self.account,
None, self.password_asker) None, self.password_asker)
...@@ -57,8 +59,6 @@ class ProcessAddCommunity(unittest.TestCase): ...@@ -57,8 +59,6 @@ class ProcessAddCommunity(unittest.TestCase):
@asyncio.coroutine @asyncio.coroutine
def exec_test(): def exec_test():
mock = new_blockchain.get_mock()
logging.debug(mock.pretend_url)
yield from asyncio.sleep(1) yield from asyncio.sleep(1)
self.network_manager.set_mock_path(mock.pretend_url) self.network_manager.set_mock_path(mock.pretend_url)
QTest.mouseClick(process_community.lineedit_server, Qt.LeftButton) QTest.mouseClick(process_community.lineedit_server, Qt.LeftButton)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment