pathod.test shouldn't use the API at all
This commit is contained in:
parent
254614e9f7
commit
a7522d9308
|
@ -4,12 +4,8 @@ import time
|
|||
|
||||
from six.moves import queue
|
||||
|
||||
import requests
|
||||
import requests.packages.urllib3
|
||||
from . import pathod
|
||||
|
||||
requests.packages.urllib3.disable_warnings()
|
||||
|
||||
|
||||
class Daemon:
|
||||
IFACE = "127.0.0.1"
|
||||
|
@ -41,13 +37,6 @@ class Daemon:
|
|||
"""
|
||||
return "%s/p/%s" % (self.urlbase, spec)
|
||||
|
||||
def info(self):
|
||||
"""
|
||||
Return some basic info about the remote daemon.
|
||||
"""
|
||||
resp = requests.get("%s/api/info" % self.urlbase, verify=False)
|
||||
return resp.json()
|
||||
|
||||
def text_log(self):
|
||||
return self.logfp.getvalue()
|
||||
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
from six.moves import cStringIO as StringIO
|
||||
|
||||
from pathod import pathod, version
|
||||
from pathod import pathod
|
||||
from netlib import tcp
|
||||
from netlib.exceptions import HttpException, TlsException
|
||||
import tutils
|
||||
|
||||
|
||||
import requests.packages.urllib3
|
||||
requests.packages.urllib3.disable_warnings()
|
||||
|
||||
|
||||
class TestPathod(object):
|
||||
|
||||
def test_logging(self):
|
||||
|
@ -138,9 +142,6 @@ class CommonTests(tutils.DaemonTests):
|
|||
r, _ = self.pathoc([r"get:'/p/200':i0,'\r\n'"])
|
||||
assert r[0].status_code == 200
|
||||
|
||||
def test_info(self):
|
||||
assert tuple(self.d.info()["version"]) == version.IVERSION
|
||||
|
||||
def test_logs(self):
|
||||
self.d.clear_log()
|
||||
assert self.get("202:da")
|
||||
|
|
Loading…
Reference in New Issue