Commit 0aa309dd authored by Łukasz Nowak's avatar Łukasz Nowak

Share assertion with all mixins.

parent 7b5a54a1
...@@ -11,6 +11,9 @@ import httplib ...@@ -11,6 +11,9 @@ import httplib
import logging import logging
class BasicMixin: class BasicMixin:
def assertSortedListEqual(self, list1, list2, msg=None):
self.assertListEqual(sorted(list1), sorted(list2), msg)
def setUp(self): def setUp(self):
self._tempdir = tempfile.mkdtemp() self._tempdir = tempfile.mkdtemp()
self.software_root = os.path.join(self._tempdir, 'software') self.software_root = os.path.join(self._tempdir, 'software')
...@@ -83,9 +86,6 @@ class MasterMixin(BasicMixin): ...@@ -83,9 +86,6 @@ class MasterMixin(BasicMixin):
class TestSlapgridCPWithMaster(MasterMixin, unittest.TestCase): class TestSlapgridCPWithMaster(MasterMixin, unittest.TestCase):
def assertSortedListEqual(self, list1, list2, msg=None):
self.assertListEqual(sorted(list1), sorted(list2), msg)
def test_nothing_to_do(self): def test_nothing_to_do(self):
def server_response(self, path, method, body, header): def server_response(self, path, method, body, header):
......
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 to comment