Skip to content

Commit 9dc3eb5

Browse files
FakeResponse: use a default status code
When running some tests from test_restapi.py, the following error happens: TypeError: unorderable types: NoneType() < int() In Python 2, comparing NoneType and integers is possible: >>> None < 2 True But in Python 3, it's not allowed. Fix this by using a default status code. Change-Id: Ic0fad5c68f3bf2dd8a2b98423549903f982192c9
1 parent 380d78c commit 9dc3eb5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎openstackclient/tests/common/test_restapi.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656

5757
class FakeResponse(requests.Response):
58-
def __init__(self, headers={}, status_code=None, data=None, encoding=None):
58+
def __init__(self, headers={}, status_code=200, data=None, encoding=None):
5959
super(FakeResponse, self).__init__()
6060

6161
self.status_code = status_code

0 commit comments

Comments
 (0)