示例#1
0
class HaproxyTest(unittest.TestCase):
    def setUp(self):
        self.clazz = Haproxy('tests/output/')

    def test_concat_files(self):
        self.assertEqual(self.clazz.concat_files(), FILE_CONTENTS)

    def test_write_config(self):
        self.clazz.write_config(self.clazz.concat_files())
        self.assertEqual(
            open("tests/output/haproxy.cfg").read(), FILE_CONTENTS)

    def test_restart(self):
        # FIXME: test for real
        self.clazz.restart()
class HaproxyTest(unittest.TestCase):

    def setUp(self):
        self.clazz = Haproxy('tests/output/')

    def test_concat_files(self):
        self.assertEqual(self.clazz.concat_files(), FILE_CONTENTS)

    def test_write_config(self):
        self.clazz.write_config(self.clazz.concat_files())
        self.assertEqual(
            open("tests/output/haproxy.cfg").read(), FILE_CONTENTS
        )

    def test_restart(self):
        # FIXME: test for real
        self.clazz.restart()
 def setUp(self):
     self.clazz = Haproxy('tests/output/')
示例#4
0
 def setUp(self):
     self.clazz = Haproxy('tests/output/')