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

Fix subsequent broken tests

parent df8525c4
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,7 @@ class TestWotTab(unittest.TestCase, QuamashTest): ...@@ -58,7 +58,7 @@ class TestWotTab(unittest.TestCase, QuamashTest):
future = asyncio.Future() future = asyncio.Future()
def open_widget(): def open_widget():
wot_tab.show() wot_tab.widget.show()
return future return future
async def async_open_widget(): async def async_open_widget():
...@@ -68,13 +68,13 @@ class TestWotTab(unittest.TestCase, QuamashTest): ...@@ -68,13 +68,13 @@ class TestWotTab(unittest.TestCase, QuamashTest):
await open_widget() await open_widget()
def close_dialog(): def close_dialog():
if wot_tab.isVisible(): if wot_tab.wiget.isVisible():
wot_tab.close() wot_tab.widget.close()
future.set_result(True) future.set_result(True)
async def exec_test(): async def exec_test():
await asyncio.sleep(1) await asyncio.sleep(1)
self.assertTrue(wot_tab.isVisible()) self.assertTrue(wot_tab.widget.isVisible())
self.lp.call_soon(close_dialog) self.lp.call_soon(close_dialog)
asyncio.ensure_future(exec_test()) asyncio.ensure_future(exec_test())
......
import unittest import unittest
from unittest.mock import patch, MagicMock, Mock from unittest.mock import patch, MagicMock, Mock
from asynctest.mock import CoroutineMock from asynctest.mock import CoroutineMock
from asynctest.mock import MagicMock as AsyncMagicMock from PyQt5.QtCore import QLocale
from PyQt5.QtCore import QLocale, pyqtSignal
from sakia.tests import QuamashTest from sakia.tests import QuamashTest
from sakia.tests.mocks.bma import nice_blockchain from sakia.tests.mocks.bma import nice_blockchain
from sakia.gui.widgets import ContextMenu from sakia.gui.widgets.context_menu import ContextMenu
class TestContextMenu(unittest.TestCase, QuamashTest): class TestContextMenu(unittest.TestCase, QuamashTest):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment