From 34ffe46fa0474a47bc737669ccd58fe036e3a033 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 7 Jun 2012 11:39:37 +1200 Subject: Add /api/info, returning general info on the running pathod daemon. --- test/test_test.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'test/test_test.py') diff --git a/test/test_test.py b/test/test_test.py index 6e80dd77..c10cee4c 100644 --- a/test/test_test.py +++ b/test/test_test.py @@ -1,10 +1,10 @@ import time import libpry import requests -from libpathod import test +from libpathod import test, version -class uDaemon(libpry.AutoTree): +class uDaemonManual(libpry.AutoTree): def test_startstop(self): d = test.Daemon() rsp = requests.get("http://localhost:%s/p/202"%d.port) @@ -15,7 +15,19 @@ class uDaemon(libpry.AutoTree): assert not rsp.ok +class uDaemon(libpry.AutoTree): + def setUpAll(self): + self.d = test.Daemon() + + def tearDownAll(self): + self.d.shutdown() + + def test_info(self): + assert tuple(self.d.info()["version"]) == version.IVERSION + + tests = [ + uDaemonManual(), uDaemon() ] -- cgit v1.2.3