summaryrefslogtreecommitdiff
path: root/tests/local_onionshare_settings_dialog_no_tor_test.py
blob: b8c06243a3594568b53b03378094fb661e73f3d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python3
import pytest
import unittest

from onionshare import strings
from .SettingsGuiBaseTest import SettingsGuiBaseTest, OnionStub


class SettingsGuiTest(unittest.TestCase, SettingsGuiBaseTest):
    @classmethod
    def setUpClass(cls):
        cls.gui = SettingsGuiBaseTest.set_up()

    @classmethod
    def tearDownClass(cls):
        SettingsGuiBaseTest.tear_down()

    @pytest.mark.gui
    @pytest.mark.skipif(pytest.__version__ < "2.9", reason="requires newer pytest")
    def test_gui_no_tor(self):
        self.gui.onion = OnionStub(False, False)
        self.gui.reload_settings()
        self.run_settings_gui_tests()


if __name__ == "__main__":
    unittest.main()