Commit 7aad8625 by Dudás Ádám

firewall: reorganize tests

parent 07d4ec62
......@@ -16,21 +16,19 @@ class MockGroups:
def all(self):
return self.groups
class HostAdminNoGroupTestCase(TestCase):
def runTest(self):
class HostAdminTestCase(TestCase):
def test_no_groups(self):
instance = MockInstance([])
l = HostAdmin.groups_l(instance)
l = HostAdmin.list_groups(instance)
self.assertEqual(l, "")
class HostAdminSingleGroupTestCase(TestCase):
def runTest(self):
def test_sigle_group(self):
instance = MockInstance([MockGroup("alma")])
l = HostAdmin.groups_l(instance)
l = HostAdmin.list_groups(instance)
self.assertEqual(l, "alma")
class HostAdminMultipleGroupsTestCase(TestCase):
def runTest(self):
def test_multiple_groups(self):
instance = MockInstance([MockGroup("alma"),
MockGroup("korte"), MockGroup("szilva")])
l = HostAdmin.groups_l(instance)
l = HostAdmin.list_groups(instance)
self.assertEqual(l, "alma, korte, szilva")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment