diff options
author | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-02-11 17:31:37 +0100 |
---|---|---|
committer | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-02-11 17:31:37 +0100 |
commit | 9dc3eb5b18612831cba7f44b592481056635a476 (patch) | |
tree | c92e5db1a3ab3803340f72f61587bc9e5d6b6a65 /openstackclient/tests/common/test_restapi.py | |
parent | 380d78c8564ca81c60d46176af622fd92a7b1582 (diff) | |
download | python-openstackclient-9dc3eb5b18612831cba7f44b592481056635a476.tar.gz |
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
Diffstat (limited to 'openstackclient/tests/common/test_restapi.py')
-rw-r--r-- | openstackclient/tests/common/test_restapi.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openstackclient/tests/common/test_restapi.py b/openstackclient/tests/common/test_restapi.py index c1e02fcb..2c1d5ddd 100644 --- a/openstackclient/tests/common/test_restapi.py +++ b/openstackclient/tests/common/test_restapi.py @@ -55,7 +55,7 @@ fake_headers = { class FakeResponse(requests.Response): - def __init__(self, headers={}, status_code=None, data=None, encoding=None): + def __init__(self, headers={}, status_code=200, data=None, encoding=None): super(FakeResponse, self).__init__() self.status_code = status_code |