Merge "Python3: fix test_client_redirects.py"
This commit is contained in:
commit
a4d261daa5
|
@ -99,7 +99,7 @@ class TestClientRedirects(functional.FunctionalTest):
|
|||
"""
|
||||
response = self.client.do_request("GET", "/")
|
||||
self.assertEqual(http.OK, response.status)
|
||||
self.assertEqual("root", response.read())
|
||||
self.assertEqual(b"root", response.read())
|
||||
|
||||
def test_get_with_one_redirect(self):
|
||||
"""
|
||||
|
@ -107,7 +107,7 @@ class TestClientRedirects(functional.FunctionalTest):
|
|||
"""
|
||||
response = self.client.do_request("GET", "/302")
|
||||
self.assertEqual(http.OK, response.status)
|
||||
self.assertEqual("success_from_host_one", response.read())
|
||||
self.assertEqual(b"success_from_host_one", response.read())
|
||||
|
||||
def test_get_with_one_redirect_query_string(self):
|
||||
"""
|
||||
|
@ -116,7 +116,7 @@ class TestClientRedirects(functional.FunctionalTest):
|
|||
response = self.client.do_request("GET", "/302",
|
||||
params={'with_qs': 'yes'})
|
||||
self.assertEqual(http.OK, response.status)
|
||||
self.assertEqual("success_with_qs", response.read())
|
||||
self.assertEqual(b"success_with_qs", response.read())
|
||||
|
||||
def test_get_with_max_redirects(self):
|
||||
"""
|
||||
|
@ -133,7 +133,7 @@ class TestClientRedirects(functional.FunctionalTest):
|
|||
"""
|
||||
response = self.client.do_request("POST", "/302")
|
||||
self.assertEqual(http.OK, response.status)
|
||||
self.assertEqual("success_from_host_one", response.read())
|
||||
self.assertEqual(b"success_from_host_one", response.read())
|
||||
|
||||
def test_redirect_to_new_host(self):
|
||||
"""
|
||||
|
@ -143,8 +143,8 @@ class TestClientRedirects(functional.FunctionalTest):
|
|||
response = self.client.do_request("POST", url)
|
||||
|
||||
self.assertEqual(http.OK, response.status)
|
||||
self.assertEqual("success_from_host_two", response.read())
|
||||
self.assertEqual(b"success_from_host_two", response.read())
|
||||
|
||||
response = self.client.do_request("POST", "/success")
|
||||
self.assertEqual(http.OK, response.status)
|
||||
self.assertEqual("success_from_host_one", response.read())
|
||||
self.assertEqual(b"success_from_host_one", response.read())
|
||||
|
|
1
tox.ini
1
tox.ini
|
@ -32,6 +32,7 @@ commands = oslo_debug_helper {posargs}
|
|||
commands =
|
||||
lockutils-wrapper python setup.py testr --slowest --testr-args='glance.tests.unit'
|
||||
python -m testtools.run \
|
||||
glance.tests.functional.test_client_redirects \
|
||||
glance.tests.functional.test_gzip_middleware \
|
||||
glance.tests.functional.test_client_exceptions \
|
||||
glance.tests.functional.test_sqlite \
|
||||
|
|
Loading…
Reference in New Issue