From 4d20281ccd9f958926ba05e27ef85db204afdb8d Mon Sep 17 00:00:00 2001 From: Inso <insomniak.fr@gmail.com> Date: Tue, 8 Sep 2015 20:00:05 +0200 Subject: [PATCH] Sleep after mock initialisation to be sure it is ready --- src/cutecoin/tests/certification/test_certification.py | 1 + src/cutecoin/tests/identities_tab/test_identities_table.py | 1 + src/cutecoin/tests/process_cfg_community/test_add_community.py | 2 ++ 3 files changed, 4 insertions(+) diff --git a/src/cutecoin/tests/certification/test_certification.py b/src/cutecoin/tests/certification/test_certification.py index 2f8870d4..33c81b87 100644 --- a/src/cutecoin/tests/certification/test_certification.py +++ b/src/cutecoin/tests/certification/test_certification.py @@ -63,6 +63,7 @@ class TestCertificationDialog(unittest.TestCase): def test_certification_init_community(self): mock = init_new_community.get_mock() + time.sleep(2) logging.debug(mock.pretend_url) self.network_manager.set_mock_path(mock.pretend_url) certification_dialog = CertificationDialog(self.application, diff --git a/src/cutecoin/tests/identities_tab/test_identities_table.py b/src/cutecoin/tests/identities_tab/test_identities_table.py index 577d4b1c..96d9911c 100644 --- a/src/cutecoin/tests/identities_tab/test_identities_table.py +++ b/src/cutecoin/tests/identities_tab/test_identities_table.py @@ -63,6 +63,7 @@ class TestIdentitiesTable(unittest.TestCase): def test_search_identity_found(self): mock = nice_blockchain.get_mock() + time.sleep(2) logging.debug(mock.pretend_url) self.network_manager.set_mock_path(mock.pretend_url) identities_tab = IdentitiesTabWidget(self.application) diff --git a/src/cutecoin/tests/process_cfg_community/test_add_community.py b/src/cutecoin/tests/process_cfg_community/test_add_community.py index 6d90010f..d7acee18 100644 --- a/src/cutecoin/tests/process_cfg_community/test_add_community.py +++ b/src/cutecoin/tests/process_cfg_community/test_add_community.py @@ -3,6 +3,7 @@ import unittest import asyncio import quamash import logging +import time from PyQt5.QtWidgets import QDialog from PyQt5.QtCore import QLocale, Qt from PyQt5.QtTest import QTest @@ -43,6 +44,7 @@ class ProcessAddCommunity(unittest.TestCase): def test_add_community_empty_blockchain(self): mock = new_blockchain.get_mock() + time.sleep(2) logging.debug(mock.pretend_url) self.network_manager.set_mock_path(mock.pretend_url) process_community = ProcessConfigureCommunity(self.application, -- GitLab