Browse Source

HUE-8760 [core] Fix TestStrictRedirection.test_redirection_blocked

jdesjean 6 năm trước cách đây
mục cha
commit
5d0b85cf95
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      desktop/core/src/desktop/tests.py

+ 3 - 1
desktop/core/src/desktop/tests.py

@@ -871,7 +871,9 @@ class TestStrictRedirection():
 
   def _test_redirection(self, redirection_url, expected_status_code, **kwargs):
     self.client.get('/accounts/logout', **kwargs)
-    response = self.client.post('/hue/accounts/login/?next=' + redirection_url, self.user, **kwargs)
+    data = self.user.copy()
+    data['next'] = redirection_url
+    response = self.client.post('/hue/accounts/login/', data, **kwargs )
     assert_equal(expected_status_code, response.status_code)
     if expected_status_code == 403:
         error_msg = 'Redirect to ' + redirection_url + ' is not allowed.'