From 8f148b6b14e4fbf1dfa78111b624c131c9cd983d Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 26 Jun 2012 17:28:07 +1200 Subject: Split pathod and pathoc daemon test suites out. --- test/test_pathoc.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/test_pathoc.py (limited to 'test/test_pathoc.py') diff --git a/test/test_pathoc.py b/test/test_pathoc.py new file mode 100644 index 00000000..c6128e22 --- /dev/null +++ b/test/test_pathoc.py @@ -0,0 +1,27 @@ +import json +from libpathod import pathoc, test, version +import tutils + + + +class TestDaemon: + @classmethod + def setUpAll(self): + self.d = test.Daemon( + staticdir=tutils.test_data.path("data"), + anchors=[("/anchor/.*", "202")] + ) + + @classmethod + def tearDownAll(self): + self.d.shutdown() + + def setUp(self): + self.d.clear_log() + + def test_info(self): + c = pathoc.Pathoc("127.0.0.1", self.d.port) + c.connect() + _, _, _, _, content = c.request("get:/api/info") + assert tuple(json.loads(content)["version"]) == version.IVERSION + -- cgit v1.2.3