From b21fa1fb3b56949f37b9fe738d3f5d569f41f462 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Fri, 22 Feb 2019 16:50:40 +1100 Subject: [PATCH 1/2] Remove obsolete test for sender closing a Receive Mode service via the web interface --- ...onshare_receive_mode_sender_closed_test.py | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 tests/local_onionshare_receive_mode_sender_closed_test.py diff --git a/tests/local_onionshare_receive_mode_sender_closed_test.py b/tests/local_onionshare_receive_mode_sender_closed_test.py deleted file mode 100644 index bfb9499a..00000000 --- a/tests/local_onionshare_receive_mode_sender_closed_test.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python3 -import pytest -import unittest - -from .GuiReceiveTest import GuiReceiveTest - -class LocalReceiveModeSenderClosedTest(unittest.TestCase, GuiReceiveTest): - @classmethod - def setUpClass(cls): - test_settings = { - "receive_allow_receiver_shutdown": True - } - cls.gui = GuiReceiveTest.set_up(test_settings) - - @classmethod - def tearDownClass(cls): - GuiReceiveTest.tear_down() - - @pytest.mark.gui - def test_gui(self): - self.run_all_common_setup_tests() - self.run_all_receive_mode_tests(False, True) - self.run_receive_mode_sender_closed_tests(False) - -if __name__ == "__main__": - unittest.main() From df657d8776e9cec87d1b863e1bcb2ac8076b405d Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Fri, 22 Feb 2019 16:53:51 +1100 Subject: [PATCH 2/2] remove actual sender_closed test function --- tests/GuiReceiveTest.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tests/GuiReceiveTest.py b/tests/GuiReceiveTest.py index 8a03283e..fd0c9810 100644 --- a/tests/GuiReceiveTest.py +++ b/tests/GuiReceiveTest.py @@ -74,18 +74,6 @@ class GuiReceiveTest(GuiBaseTest): self.assertEqual(mode.history.completed_count, before_completed_count) self.assertEqual(len(mode.history.item_list.items), before_number_of_history_items) - def run_receive_mode_sender_closed_tests(self, public_mode): - '''Test that the share can be stopped by the sender in receive mode''' - if not public_mode: - path = 'http://127.0.0.1:{}/{}/close'.format(self.gui.app.port, self.gui.receive_mode.web.slug) - else: - path = 'http://127.0.0.1:{}/close'.format(self.gui.app.port) - response = requests.post(path) - self.server_is_stopped(self.gui.receive_mode, False) - self.web_server_is_stopped() - self.server_status_indicator_says_closed(self.gui.receive_mode, False) - - # 'Grouped' tests follow from here def run_all_receive_mode_setup_tests(self, public_mode):