summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMiguel Jacq <mig@mig5.net>2018-10-15 11:15:32 +1100
committerMiguel Jacq <mig@mig5.net>2018-10-15 11:15:32 +1100
commited224f03884e80922127497d68576b860feaa3af (patch)
tree4f14c1922538be9ba5df135ee2af2eb92a532b0b /tests
parent46bec2f2615cee4d15fa312188bb014be2038dd0 (diff)
downloadonionshare-ed224f03884e80922127497d68576b860feaa3af.tar.gz
onionshare-ed224f03884e80922127497d68576b860feaa3af.zip
Move GUI tests into a single function each, which solves ordering bugs, and also means we don't need to depend on pytest-ordering
Diffstat (limited to 'tests')
-rw-r--r--tests/local_onionshare_receive_mode_upload_public_mode_test.py5
-rw-r--r--tests/local_onionshare_receive_mode_upload_test.py5
-rw-r--r--tests/local_onionshare_share_mode_download_public_mode_test.py5
-rw-r--r--tests/local_onionshare_share_mode_download_stay_open_test.py5
-rw-r--r--tests/local_onionshare_share_mode_download_test.py5
-rw-r--r--tests/local_onionshare_share_mode_slug_persistent_test.py5
-rw-r--r--tests/local_onionshare_share_mode_timer_test.py5
-rw-r--r--tests/onionshare_790_cancel_on_second_share_test.py18
-rw-r--r--tests/onionshare_receive_mode_upload_public_mode_test.py6
-rw-r--r--tests/onionshare_receive_mode_upload_test.py6
-rw-r--r--tests/onionshare_share_mode_cancel_share_test.py10
-rw-r--r--tests/onionshare_share_mode_download_public_mode_test.py6
-rw-r--r--tests/onionshare_share_mode_download_stay_open_test.py6
-rw-r--r--tests/onionshare_share_mode_download_test.py6
-rw-r--r--tests/onionshare_share_mode_persistent_test.py6
-rw-r--r--tests/onionshare_share_mode_stealth_test.py6
-rw-r--r--tests/onionshare_share_mode_timer_test.py6
17 files changed, 17 insertions, 94 deletions
diff --git a/tests/local_onionshare_receive_mode_upload_public_mode_test.py b/tests/local_onionshare_receive_mode_upload_public_mode_test.py
index 27bf9b2c..c99fae52 100644
--- a/tests/local_onionshare_receive_mode_upload_public_mode_test.py
+++ b/tests/local_onionshare_receive_mode_upload_public_mode_test.py
@@ -13,11 +13,8 @@ class LocalReceiveModePublicModeTest(unittest.TestCase, GuiReceiveTest):
}
cls.gui = GuiReceiveTest.set_up(test_settings, 'LocalReceiveModePublicModeTest')
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- def test_run_all_receive_mode_tests(self):
self.run_all_receive_mode_tests(True, True)
if __name__ == "__main__":
diff --git a/tests/local_onionshare_receive_mode_upload_test.py b/tests/local_onionshare_receive_mode_upload_test.py
index f6594105..dc6c1f06 100644
--- a/tests/local_onionshare_receive_mode_upload_test.py
+++ b/tests/local_onionshare_receive_mode_upload_test.py
@@ -12,11 +12,8 @@ class LocalReceiveModeTest(unittest.TestCase, GuiReceiveTest):
}
cls.gui = GuiReceiveTest.set_up(test_settings, 'LocalReceiveModeTest')
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- def test_run_all_receive_mode_tests(self):
self.run_all_receive_mode_tests(False, True)
if __name__ == "__main__":
diff --git a/tests/local_onionshare_share_mode_download_public_mode_test.py b/tests/local_onionshare_share_mode_download_public_mode_test.py
index 2a3f9584..bfed9443 100644
--- a/tests/local_onionshare_share_mode_download_public_mode_test.py
+++ b/tests/local_onionshare_share_mode_download_public_mode_test.py
@@ -12,11 +12,8 @@ class LocalShareModePublicModeTest(unittest.TestCase, GuiShareTest):
}
cls.gui = GuiShareTest.set_up(test_settings, 'LocalShareModePublicModeTest')
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- def test_run_all_share_mode_tests(self):
self.run_all_share_mode_tests(True, False)
if __name__ == "__main__":
diff --git a/tests/local_onionshare_share_mode_download_stay_open_test.py b/tests/local_onionshare_share_mode_download_stay_open_test.py
index 1f734ae7..b68516a2 100644
--- a/tests/local_onionshare_share_mode_download_stay_open_test.py
+++ b/tests/local_onionshare_share_mode_download_stay_open_test.py
@@ -12,11 +12,8 @@ class LocalShareModeStayOpenTest(unittest.TestCase, GuiShareTest):
}
cls.gui = GuiShareTest.set_up(test_settings, 'LocalShareModeStayOpenTest')
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- def test_run_all_share_mode_tests(self):
self.run_all_share_mode_tests(False, True)
if __name__ == "__main__":
diff --git a/tests/local_onionshare_share_mode_download_test.py b/tests/local_onionshare_share_mode_download_test.py
index 274cc311..a2a16c96 100644
--- a/tests/local_onionshare_share_mode_download_test.py
+++ b/tests/local_onionshare_share_mode_download_test.py
@@ -11,11 +11,8 @@ class LocalShareModeTest(unittest.TestCase, GuiShareTest):
}
cls.gui = GuiShareTest.set_up(test_settings, 'LocalShareModeTest')
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- def test_run_all_share_mode_tests(self):
self.run_all_share_mode_tests(False, False)
if __name__ == "__main__":
diff --git a/tests/local_onionshare_share_mode_slug_persistent_test.py b/tests/local_onionshare_share_mode_slug_persistent_test.py
index 3450ec3f..03285fa1 100644
--- a/tests/local_onionshare_share_mode_slug_persistent_test.py
+++ b/tests/local_onionshare_share_mode_slug_persistent_test.py
@@ -15,11 +15,8 @@ class LocalShareModePersistentSlugTest(unittest.TestCase, GuiShareTest):
}
cls.gui = GuiShareTest.set_up(test_settings, 'LocalShareModePersistentSlugTest')
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- def test_run_all_share_mode_tests(self):
self.run_all_share_mode_persistent_tests(False, True)
if __name__ == "__main__":
diff --git a/tests/local_onionshare_share_mode_timer_test.py b/tests/local_onionshare_share_mode_timer_test.py
index f9f36c48..3d20efc4 100644
--- a/tests/local_onionshare_share_mode_timer_test.py
+++ b/tests/local_onionshare_share_mode_timer_test.py
@@ -13,11 +13,8 @@ class LocalShareModeTimerTest(unittest.TestCase, GuiShareTest):
}
cls.gui = GuiShareTest.set_up(test_settings, 'LocalShareModeTimerTest')
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- def test_run_all_share_mode_timer_tests(self):
self.run_all_share_mode_timer_tests(False)
if __name__ == "__main__":
diff --git a/tests/onionshare_790_cancel_on_second_share_test.py b/tests/onionshare_790_cancel_on_second_share_test.py
index 36725fb0..21747d4c 100644
--- a/tests/onionshare_790_cancel_on_second_share_test.py
+++ b/tests/onionshare_790_cancel_on_second_share_test.py
@@ -14,27 +14,11 @@ class ShareModeCancelSecondShareTest(unittest.TestCase, TorGuiShareTest):
cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModeCancelSecondShareTest')
@pytest.mark.tor
- def test_run_all_common_setup_tests(self):
+ def test_gui(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_tests(self):
self.run_all_share_mode_tests(False, False)
-
- @pytest.mark.run(after='test_run_share_mode_tests')
- @pytest.mark.tor
- def test_cancel_the_share(self):
self.cancel_the_share(self.gui.share_mode)
-
- @pytest.mark.run(after='test_cancel_the_share')
- @pytest.mark.tor
- def test_server_is_stopped_round2(self):
self.server_is_stopped(self.gui.share_mode, False)
-
- @pytest.mark.run(after='test_server_is_stopped_round2')
- @pytest.mark.tor
- def test_web_service_is_stopped_round2(self):
self.web_service_is_stopped()
if __name__ == "__main__":
diff --git a/tests/onionshare_receive_mode_upload_public_mode_test.py b/tests/onionshare_receive_mode_upload_public_mode_test.py
index ee0c5c34..56b49c81 100644
--- a/tests/onionshare_receive_mode_upload_public_mode_test.py
+++ b/tests/onionshare_receive_mode_upload_public_mode_test.py
@@ -14,12 +14,8 @@ class ReceiveModeTest(unittest.TestCase, TorGuiReceiveTest):
cls.gui = TorGuiReceiveTest.set_up(test_settings, 'ReceiveModeTest')
@pytest.mark.tor
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- @pytest.mark.tor
- def test_run_all_receive_mode_tests(self):
self.run_all_receive_mode_tests(True, True)
if __name__ == "__main__":
diff --git a/tests/onionshare_receive_mode_upload_test.py b/tests/onionshare_receive_mode_upload_test.py
index f1f683cc..0fd8d5ed 100644
--- a/tests/onionshare_receive_mode_upload_test.py
+++ b/tests/onionshare_receive_mode_upload_test.py
@@ -13,12 +13,8 @@ class ReceiveModeTest(unittest.TestCase, TorGuiReceiveTest):
cls.gui = TorGuiReceiveTest.set_up(test_settings, 'ReceiveModeTest')
@pytest.mark.tor
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- @pytest.mark.tor
- def test_run_all_receive_mode_tests(self):
self.run_all_receive_mode_tests(False, True)
if __name__ == "__main__":
diff --git a/tests/onionshare_share_mode_cancel_share_test.py b/tests/onionshare_share_mode_cancel_share_test.py
index 97adf9ce..9770cc35 100644
--- a/tests/onionshare_share_mode_cancel_share_test.py
+++ b/tests/onionshare_share_mode_cancel_share_test.py
@@ -12,17 +12,9 @@ class ShareModeCancelTest(unittest.TestCase, TorGuiShareTest):
cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModeCancelTest')
@pytest.mark.tor
- def test_run_all_common_setup_tests(self):
+ def test_gui(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()
-
- @pytest.mark.run(after='test_run_share_mode_setup_tests')
- @pytest.mark.tor
- def test_cancel_the_share(self):
self.cancel_the_share(self.gui.share_mode)
if __name__ == "__main__":
diff --git a/tests/onionshare_share_mode_download_public_mode_test.py b/tests/onionshare_share_mode_download_public_mode_test.py
index a4a3bfb1..8409720a 100644
--- a/tests/onionshare_share_mode_download_public_mode_test.py
+++ b/tests/onionshare_share_mode_download_public_mode_test.py
@@ -13,12 +13,8 @@ class ShareModePublicModeTest(unittest.TestCase, TorGuiShareTest):
cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModePublicModeTest')
@pytest.mark.tor
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- @pytest.mark.tor
- def test_run_all_share_mode_tests(self):
self.run_all_share_mode_tests(True, False)
if __name__ == "__main__":
diff --git a/tests/onionshare_share_mode_download_stay_open_test.py b/tests/onionshare_share_mode_download_stay_open_test.py
index 33544217..c16f91e9 100644
--- a/tests/onionshare_share_mode_download_stay_open_test.py
+++ b/tests/onionshare_share_mode_download_stay_open_test.py
@@ -13,12 +13,8 @@ class ShareModeStayOpenTest(unittest.TestCase, TorGuiShareTest):
cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModeStayOpenTest')
@pytest.mark.tor
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- @pytest.mark.tor
- def test_run_all_share_mode_tests(self):
self.run_all_share_mode_tests(False, True)
if __name__ == "__main__":
diff --git a/tests/onionshare_share_mode_download_test.py b/tests/onionshare_share_mode_download_test.py
index 8d6d9655..194328d9 100644
--- a/tests/onionshare_share_mode_download_test.py
+++ b/tests/onionshare_share_mode_download_test.py
@@ -12,12 +12,8 @@ class ShareModeTest(unittest.TestCase, TorGuiShareTest):
cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModeTest')
@pytest.mark.tor
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- @pytest.mark.tor
- def test_run_all_share_mode_tests(self):
self.run_all_share_mode_tests(False, False)
if __name__ == "__main__":
diff --git a/tests/onionshare_share_mode_persistent_test.py b/tests/onionshare_share_mode_persistent_test.py
index 9a813e5d..3c283943 100644
--- a/tests/onionshare_share_mode_persistent_test.py
+++ b/tests/onionshare_share_mode_persistent_test.py
@@ -17,12 +17,8 @@ class ShareModePersistentSlugTest(unittest.TestCase, TorGuiShareTest):
cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModePersistentSlugTest')
@pytest.mark.tor
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- @pytest.mark.tor
- def test_run_all_share_mode_tests(self):
self.run_all_share_mode_persistent_tests(False, True)
if __name__ == "__main__":
diff --git a/tests/onionshare_share_mode_stealth_test.py b/tests/onionshare_share_mode_stealth_test.py
index d7e13540..b414de1f 100644
--- a/tests/onionshare_share_mode_stealth_test.py
+++ b/tests/onionshare_share_mode_stealth_test.py
@@ -14,12 +14,8 @@ class ShareModeStealthTest(unittest.TestCase, TorGuiShareTest):
cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModeStealthTest')
@pytest.mark.tor
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- @pytest.mark.tor
- def test_run_stealth_mode_tests(self):
self.run_all_share_mode_setup_tests()
self.run_all_share_mode_started_tests(False)
self.copy_have_hidserv_auth_button(self.gui.share_mode)
diff --git a/tests/onionshare_share_mode_timer_test.py b/tests/onionshare_share_mode_timer_test.py
index 32e28c00..b53905d0 100644
--- a/tests/onionshare_share_mode_timer_test.py
+++ b/tests/onionshare_share_mode_timer_test.py
@@ -14,12 +14,8 @@ class ShareModeTimerTest(unittest.TestCase, TorGuiShareTest):
cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModeTimerTest')
@pytest.mark.tor
- def test_run_all_common_setup_tests(self):
+ def test_gui(self):
self.run_all_common_setup_tests()
-
- @pytest.mark.run(after='test_run_all_common_setup_tests')
- @pytest.mark.tor
- def test_run_all_share_mode_timer_tests(self):
self.run_all_share_mode_timer_tests(False)
if __name__ == "__main__":