summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMiguel Jacq <mig@mig5.net>2018-10-14 15:11:57 +1100
committerMiguel Jacq <mig@mig5.net>2018-10-14 15:11:57 +1100
commit46bec2f2615cee4d15fa312188bb014be2038dd0 (patch)
treed8a131bfff3d5e99f210c37ab31d14be67c3fd60 /tests
parente31a424a4d5ca6976fe6888b48f4171de2dc3592 (diff)
downloadonionshare-46bec2f2615cee4d15fa312188bb014be2038dd0.tar.gz
onionshare-46bec2f2615cee4d15fa312188bb014be2038dd0.zip
fix stealth test. Remove tor connection killed test, because it doesn't work like this in 'automatic' connection mode which we need for Mac/Windows testing
Diffstat (limited to 'tests')
-rw-r--r--tests/TorGuiBaseTest.py7
-rw-r--r--tests/onionshare_share_mode_stealth_test.py10
-rw-r--r--tests/onionshare_share_mode_tor_connection_killed_test.py41
3 files changed, 1 insertions, 57 deletions
diff --git a/tests/TorGuiBaseTest.py b/tests/TorGuiBaseTest.py
index 82ecc1b4..2fadfab7 100644
--- a/tests/TorGuiBaseTest.py
+++ b/tests/TorGuiBaseTest.py
@@ -149,10 +149,3 @@ class TorGuiBaseTest(GuiBaseTest):
def hidserv_auth_string(self):
'''Test the validity of the HidservAuth string'''
self.assertRegex(self.gui.app.auth_string, r'HidServAuth %s [a-zA-Z1-9]' % self.gui.app.onion_host)
-
- # Miscellaneous tests
- def tor_killed_statusbar_message_shown(self, mode):
- '''Test that the status bar message shows Tor was disconnected'''
- self.gui.app.onion.cleanup(stop_tor=True)
- QtTest.QTest.qWait(2500)
- self.assertTrue(mode.status_bar.currentMessage(), strings._('gui_tor_connection_lost'))
diff --git a/tests/onionshare_share_mode_stealth_test.py b/tests/onionshare_share_mode_stealth_test.py
index a6bbe08e..d7e13540 100644
--- a/tests/onionshare_share_mode_stealth_test.py
+++ b/tests/onionshare_share_mode_stealth_test.py
@@ -19,18 +19,10 @@ class ShareModeStealthTest(unittest.TestCase, TorGuiShareTest):
@pytest.mark.run(after='test_run_all_common_setup_tests')
@pytest.mark.tor
- def test_run_share_mode_setup_tests(self):
+ def test_run_stealth_mode_tests(self):
self.run_all_share_mode_setup_tests()
self.run_all_share_mode_started_tests(False)
-
- @pytest.mark.run(after='test_run_share_mode_setup_tests')
- @pytest.mark.tor
- def test_copy_have_hidserv_auth_button(self):
self.copy_have_hidserv_auth_button(self.gui.share_mode)
-
- @pytest.mark.run(after='test_run_share_mode_setup_tests')
- @pytest.mark.tor
- def test_hidserv_auth_string(self):
self.hidserv_auth_string()
if __name__ == "__main__":
diff --git a/tests/onionshare_share_mode_tor_connection_killed_test.py b/tests/onionshare_share_mode_tor_connection_killed_test.py
deleted file mode 100644
index 9112aedd..00000000
--- a/tests/onionshare_share_mode_tor_connection_killed_test.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python3
-import pytest
-import unittest
-
-from .TorGuiShareTest import TorGuiShareTest
-
-class ShareModeTorConnectionKilledTest(unittest.TestCase, TorGuiShareTest):
- @classmethod
- def setUpClass(cls):
- test_settings = {
- }
- cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModeTorConnectionKilledTest')
-
- @pytest.mark.tor
- def test_run_all_common_setup_tests(self):
- self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- @pytest.mark.tor
- def test_run_share_mode_setup_tests(self):
- self.run_all_share_mode_setup_tests()
- self.run_all_share_mode_started_tests(False)
-
- @pytest.mark.run(after='test_run_share_mode_setup_tests')
- @pytest.mark.tor
- def test_tor_killed_statusbar_message_shown(self):
- self.tor_killed_statusbar_message_shown(self.gui.share_mode)
-
- @pytest.mark.run(after='test_tor_killed_statusbar_message_shown')
- @pytest.mark.tor
- def test_server_is_stopped(self):
- self.server_is_stopped(self.gui.share_mode, False)
-
- @pytest.mark.run(after='test_tor_killed_statusbar_message_shown')
- @pytest.mark.tor
- def test_web_service_is_stopped(self):
- self.web_service_is_stopped()
-
-
-if __name__ == "__main__":
- unittest.main()