mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
tor: tests: Convert to pytest style tests from class based tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
37b9e21e30
commit
3aae4b39d6
@ -11,10 +11,6 @@ from django.core.exceptions import ValidationError
|
|||||||
from plinth.modules.tor import forms, utils
|
from plinth.modules.tor import forms, utils
|
||||||
|
|
||||||
|
|
||||||
class TestTor:
|
|
||||||
"""Test cases for testing the Tor module."""
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
@patch('plinth.app.App.get')
|
@patch('plinth.app.App.get')
|
||||||
@pytest.mark.usefixtures('needs_root', 'load_cfg')
|
@pytest.mark.usefixtures('needs_root', 'load_cfg')
|
||||||
def test_get_status(_app_get):
|
def test_get_status(_app_get):
|
||||||
@ -26,10 +22,6 @@ class TestTor:
|
|||||||
utils.get_status()
|
utils.get_status()
|
||||||
|
|
||||||
|
|
||||||
class TestTorForm:
|
|
||||||
"""Test whether Tor configration form works."""
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def test_bridge_validator():
|
def test_bridge_validator():
|
||||||
"""Test upstream bridges' form field validator."""
|
"""Test upstream bridges' form field validator."""
|
||||||
validator = forms.bridges_validator
|
validator = forms.bridges_validator
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user