Merge pull request #1472 from xxNB/dev
Remove unwanted None check for __repr__ in `Request` class
This commit is contained in:
commit
2758a3ade6
|
@ -115,8 +115,6 @@ class Request(dict):
|
||||||
self.endpoint = None
|
self.endpoint = None
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
if self.method is None or not self.path:
|
|
||||||
return "<{0}>".format(self.__class__.__name__)
|
|
||||||
return "<{0}: {1} {2}>".format(
|
return "<{0}: {1} {2}>".format(
|
||||||
self.__class__.__name__, self.method, self.path
|
self.__class__.__name__, self.method, self.path
|
||||||
)
|
)
|
||||||
|
|
|
@ -566,7 +566,7 @@ def test_request_repr(app):
|
||||||
assert repr(request) == "<Request: GET />"
|
assert repr(request) == "<Request: GET />"
|
||||||
|
|
||||||
request.method = None
|
request.method = None
|
||||||
assert repr(request) == "<Request>"
|
assert repr(request) == "<Request: None />"
|
||||||
|
|
||||||
|
|
||||||
def test_request_bool(app):
|
def test_request_bool(app):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user