Port error_pages tests to Python 3
HTTP response type is bytes: use a literal byte strings, instead of a Unicode string. Partial-Implements: blueprint porting-python3 Change-Id: I989a4da786652058e5204386a70e298ec0e7b8e3
This commit is contained in:
parent
88983a8a65
commit
c8bf36d815
@ -28,4 +28,4 @@ class ErrorPageTests(test.TestCase):
|
||||
TEMPLATE_DIRS = (path.join(settings.ROOT_PATH, 'templates'),)
|
||||
with self.settings(TEMPLATE_DIRS=TEMPLATE_DIRS):
|
||||
response = self.client.get('/500/')
|
||||
self.assertTrue('Server error' in response.content)
|
||||
self.assertIn(b'Server error', response.content)
|
||||
|
1
tox.ini
1
tox.ini
@ -53,6 +53,7 @@ commands =
|
||||
openstack_dashboard.test.api_tests.nova_tests \
|
||||
openstack_dashboard.test.test_plugins.panel_group_tests.PanelGroupPluginTests \
|
||||
openstack_dashboard.test.test_plugins.panel_tests.PanelPluginTests \
|
||||
openstack_dashboard.test.tests.error_pages \
|
||||
openstack_dashboard.test.tests.policy \
|
||||
openstack_dashboard.test.tests.policy_backend \
|
||||
openstack_dashboard.test.tests.utils
|
||||
|
Loading…
Reference in New Issue
Block a user