Merge pull request #1069 from mig5/1064_tabs_fixes

1064 tabs fixes
This commit is contained in:
Micah Lee 2019-11-24 21:14:14 -08:00 committed by GitHub
commit cd3af7283d
3 changed files with 13 additions and 3 deletions

View File

@ -80,7 +80,7 @@ class GuiBaseTest(unittest.TestCase):
def verify_new_tab(self, tab):
# Make sure the new tab widget is showing, and no mode has been started
QtTest.QTest.qWait(500)
QtTest.QTest.qWait(1000)
self.assertTrue(tab.new_tab.isVisible())
self.assertFalse(hasattr(tab, "share_mode"))
self.assertFalse(hasattr(tab, "receive_mode"))
@ -349,7 +349,7 @@ class GuiBaseTest(unittest.TestCase):
def web_server_is_stopped(self, tab):
"""Test that the web server also stopped"""
QtTest.QTest.qWait(200)
QtTest.QTest.qWait(800)
try:
requests.get(f"http://127.0.0.1:{tab.app.port}/")

View File

@ -33,7 +33,7 @@ class MyOnion:
self.scheduled_key = None
@staticmethod
def start_onion_service(self, await_publication=True, save_scheduled_key=False):
def start_onion_service(self, mode_settings_obj, await_publication=True, save_scheduled_key=False):
return "test_service_id.onion"

View File

@ -561,6 +561,11 @@ class TestShare(GuiBaseTest):
Rate limit should be triggered
"""
tab = self.new_share_tab()
def accept_dialog():
window = tab.common.gui.qtapp.activeWindow()
if window:
window.close()
tab.get_mode().autostop_sharing_checkbox.click()
self.run_all_common_setup_tests()
@ -575,6 +580,11 @@ class TestShare(GuiBaseTest):
Public mode should skip the rate limit
"""
tab = self.new_share_tab()
def accept_dialog():
window = tab.common.gui.qtapp.activeWindow()
if window:
window.close()
tab.get_mode().autostop_sharing_checkbox.click()
tab.get_mode().mode_settings_widget.public_checkbox.click()