From 9dc3eb5b18612831cba7f44b592481056635a476 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Tue, 11 Feb 2014 17:31:37 +0100 Subject: 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 --- openstackclient/tests/common/test_restapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openstackclient/tests/common/test_restapi.py') 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 -- cgit v1.2.1