summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tempest_horizon/tests/scenario/test_dashboard_basic_ops.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tempest_horizon/tests/scenario/test_dashboard_basic_ops.py b/tempest_horizon/tests/scenario/test_dashboard_basic_ops.py
index cd4af56..815b17a 100644
--- a/tempest_horizon/tests/scenario/test_dashboard_basic_ops.py
+++ b/tempest_horizon/tests/scenario/test_dashboard_basic_ops.py
@@ -84,14 +84,14 @@ class TestDashboardBasicOps(test.BaseTestCase):
84 84
85 def check_login_page(self): 85 def check_login_page(self):
86 response = self._get_opener().open(CONF.dashboard.dashboard_url).read() 86 response = self._get_opener().open(CONF.dashboard.dashboard_url).read()
87 self.assertIn("id_username", response) 87 self.assertIn("id_username", response.decode("utf-8"))
88 88
89 def user_login(self, username, password): 89 def user_login(self, username, password):
90 response = self._get_opener().open(CONF.dashboard.dashboard_url).read() 90 response = self._get_opener().open(CONF.dashboard.dashboard_url).read()
91 91
92 # Grab the CSRF token and default region 92 # Grab the CSRF token and default region
93 parser = HorizonHTMLParser() 93 parser = HorizonHTMLParser()
94 parser.feed(response) 94 parser.feed(response.decode("utf-8"))
95 95
96 # construct login url for dashboard, discovery accommodates non-/ web 96 # construct login url for dashboard, discovery accommodates non-/ web
97 # root for dashboard 97 # root for dashboard
@@ -109,11 +109,11 @@ class TestDashboardBasicOps(test.BaseTestCase):
109 'region': parser.region, 109 'region': parser.region,
110 'domain': CONF.auth.default_credentials_domain_name, 110 'domain': CONF.auth.default_credentials_domain_name,
111 'csrfmiddlewaretoken': parser.csrf_token} 111 'csrfmiddlewaretoken': parser.csrf_token}
112 self._get_opener().open(req, parse.urlencode(params)) 112 self._get_opener().open(req, parse.urlencode(params).encode())
113 113
114 def check_home_page(self): 114 def check_home_page(self):
115 response = self._get_opener().open(CONF.dashboard.dashboard_url).read() 115 response = self._get_opener().open(CONF.dashboard.dashboard_url).read()
116 self.assertIn('Overview', response) 116 self.assertIn('Overview', response.decode("utf-8"))
117 117
118 def _get_opener(self): 118 def _get_opener(self):
119 if not self.opener: 119 if not self.opener: