2018-10-12 18:49:05 -04:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import pytest
|
|
|
|
import unittest
|
|
|
|
|
|
|
|
from .TorGuiShareTest import TorGuiShareTest
|
|
|
|
|
|
|
|
# Tests #790 regression
|
|
|
|
class ShareModeCancelSecondShareTest(unittest.TestCase, TorGuiShareTest):
|
|
|
|
@classmethod
|
|
|
|
def setUpClass(cls):
|
|
|
|
test_settings = {
|
2019-01-16 00:52:42 -05:00
|
|
|
"close_after_first_download": True
|
2018-10-12 18:49:05 -04:00
|
|
|
}
|
2018-10-17 01:31:51 -04:00
|
|
|
cls.gui = TorGuiShareTest.set_up(test_settings)
|
2018-10-12 18:49:05 -04:00
|
|
|
|
2018-10-16 00:53:35 -04:00
|
|
|
@classmethod
|
|
|
|
def tearDownClass(cls):
|
|
|
|
TorGuiShareTest.tear_down()
|
|
|
|
|
2019-01-16 00:52:42 -05:00
|
|
|
@pytest.mark.gui
|
2018-10-12 18:49:05 -04:00
|
|
|
@pytest.mark.tor
|
2019-04-18 23:38:44 -04:00
|
|
|
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
|
2018-10-14 20:15:32 -04:00
|
|
|
def test_gui(self):
|
2018-10-12 18:49:05 -04:00
|
|
|
self.run_all_common_setup_tests()
|
|
|
|
self.run_all_share_mode_tests(False, False)
|
|
|
|
self.cancel_the_share(self.gui.share_mode)
|
|
|
|
self.server_is_stopped(self.gui.share_mode, False)
|
2018-10-15 22:01:44 -04:00
|
|
|
self.web_server_is_stopped()
|
2018-10-12 18:49:05 -04:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
unittest.main()
|