use HTTPStatus instead of direct code
Python introduced http.HTTPStatus since version 3.5, and Wallaby has targeted a minimum version of python 3.6. Change-Id: I45f732f0f59b8fae831bb6c07f4fdd98cdd7409a
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from http import HTTPStatus
|
||||
|
||||
from watcher.tests.api import base
|
||||
|
||||
|
||||
@@ -25,6 +27,6 @@ class TestBase(base.FunctionalTest):
|
||||
response = self.get_json('/bad/path',
|
||||
expect_errors=True,
|
||||
headers={"Accept": "application/json"})
|
||||
self.assertEqual(404, response.status_int)
|
||||
self.assertEqual(HTTPStatus.NOT_FOUND, response.status_int)
|
||||
self.assertEqual("application/json", response.content_type)
|
||||
self.assertTrue(response.json['error_message'])
|
||||
|
||||
Reference in New Issue
Block a user