Merge "Port dashboard api access tests to Python 3"

This commit is contained in:
Jenkins 2015-09-08 18:57:33 +00:00 committed by Gerrit Code Review
commit 14fd7b0a10
2 changed files with 3 additions and 2 deletions

View File

@ -58,8 +58,8 @@ class APIAccessTests(test.TestCase):
self.assertTemplateUsed(res, openrc)
name = 'export OS_USERNAME="{}"'.format(self.request.user.username)
id = 'export OS_TENANT_ID={}'.format(self.request.user.tenant_id)
self.assertTrue(name in res.content)
self.assertTrue(id in res.content)
self.assertIn(name.encode('utf-8'), res.content)
self.assertIn(id.encode('utf-8'), res.content)
@test.create_stubs({api.keystone: ("list_ec2_credentials",)})
def test_credential_api(self):

View File

@ -35,6 +35,7 @@ commands =
horizon.test.tests.utils.ValidatorsTests \
horizon.test.tests.views
python manage.py test --settings=openstack_dashboard.test.settings \
openstack_dashboard.dashboards.project.access_and_security.api_access.tests \
openstack_dashboard.dashboards.project.images.images.tests.CreateImageFormTests \
openstack_dashboard.dashboards.project.images.tests.ImagesAndSnapshotsUtilsTests \
openstack_dashboard.dashboards.project.stacks.tests.TemplateFormTests \