Rename Request.url to Request.path.
This commit is contained in:
parent
c052c8a107
commit
4bf6359205
@ -34,7 +34,7 @@ from PyQt5.QtCore import pyqtSignal
|
|||||||
import testprocess # pylint: disable=import-error
|
import testprocess # pylint: disable=import-error
|
||||||
|
|
||||||
|
|
||||||
Request = collections.namedtuple('Request', 'verb, url')
|
Request = collections.namedtuple('Request', 'verb, path')
|
||||||
|
|
||||||
|
|
||||||
class HTTPBin(testprocess.Process):
|
class HTTPBin(testprocess.Process):
|
||||||
@ -59,7 +59,7 @@ class HTTPBin(testprocess.Process):
|
|||||||
\ \[(?P<date>[^]]*)\]
|
\ \[(?P<date>[^]]*)\]
|
||||||
\ "(?P<request>
|
\ "(?P<request>
|
||||||
(?P<verb>[^ ]*)
|
(?P<verb>[^ ]*)
|
||||||
\ (?P<url>[^ ]*)
|
\ (?P<path>[^ ]*)
|
||||||
\ (?P<protocol>[^ ]*)
|
\ (?P<protocol>[^ ]*)
|
||||||
)"
|
)"
|
||||||
\ (?P<status>[^ ]*)
|
\ (?P<status>[^ ]*)
|
||||||
@ -81,7 +81,8 @@ class HTTPBin(testprocess.Process):
|
|||||||
|
|
||||||
def get_requests(self):
|
def get_requests(self):
|
||||||
"""Get the requests to the server during this test."""
|
"""Get the requests to the server during this test."""
|
||||||
return self._get_data()
|
requests = self._get_data()
|
||||||
|
return [r for r in requests if r.path != '/favicon.ico']
|
||||||
|
|
||||||
def _parse_line(self, line):
|
def _parse_line(self, line):
|
||||||
print(line)
|
print(line)
|
||||||
@ -96,7 +97,7 @@ class HTTPBin(testprocess.Process):
|
|||||||
# FIXME do we need to allow other options?
|
# FIXME do we need to allow other options?
|
||||||
assert match.group('protocol') == 'HTTP/1.1'
|
assert match.group('protocol') == 'HTTP/1.1'
|
||||||
|
|
||||||
return Request(verb=match.group('verb'), url=match.group('url'))
|
return Request(verb=match.group('verb'), path=match.group('path'))
|
||||||
|
|
||||||
def _executable_args(self):
|
def _executable_args(self):
|
||||||
if hasattr(sys, 'frozen'):
|
if hasattr(sys, 'frozen'):
|
||||||
|
Loading…
Reference in New Issue
Block a user