mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
pagekite: Convert tests to pytest style
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
parent
0cacb21983
commit
e53e120dbb
@ -19,13 +19,9 @@
|
|||||||
Test modules for Pagekite functions.
|
Test modules for Pagekite functions.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import unittest
|
|
||||||
|
|
||||||
from plinth.modules.pagekite import utils
|
from plinth.modules.pagekite import utils
|
||||||
|
|
||||||
|
|
||||||
class TestPagekiteActions(unittest.TestCase):
|
|
||||||
"""Test-cases for the pagekite action utils"""
|
|
||||||
_tests = [
|
_tests = [
|
||||||
{
|
{
|
||||||
'line': 'https/8080:*.@kitename:localhost:8080:@kitesecret',
|
'line': 'https/8080:*.@kitename:localhost:8080:@kitesecret',
|
||||||
@ -51,8 +47,8 @@ class TestPagekiteActions(unittest.TestCase):
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
def test_convert_service_to_string(self):
|
def test_convert_service_to_string():
|
||||||
""" Test deconstructing parameter dictionaries into strings """
|
""" Test deconstructing parameter dictionaries into strings """
|
||||||
for test in self._tests:
|
for test in _tests:
|
||||||
service_string = utils.convert_service_to_string(test['params'])
|
service_string = utils.convert_service_to_string(test['params'])
|
||||||
self.assertEqual(test['line'], service_string)
|
assert test['line'] == service_string
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user