Skip to content

Commit 414a3a7

Browse files
committed
Fix incorrect tests
1 parent 3df8200 commit 414a3a7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/test_auth.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,9 @@ def test_successful_external_login_cas_redirect(self, mock_service_validate, moc
135135
resp = cas.make_response_from_ticket(ticket, service_url)
136136
assert resp.status_code == 302, 'redirect to CAS login'
137137
assert quote_plus('/login?service=') in resp.location
138-
139-
# the valid username will be double quoted as it is furl quoted in both get_login_url and get_logout_url in order
140-
assert quote_plus(f'username={user.username}') in resp.location
141-
assert quote_plus(f'verification_key={user.verification_key}') in resp.location
138+
# the valid username and verification key should be double-quoted
139+
assert quote_plus(f'username={quote_plus(user.username)}') in resp.location
140+
assert quote_plus(f'verification_key={quote_plus(user.verification_key)}') in resp.location
142141

143142
@mock.patch('framework.auth.cas.get_user_from_cas_resp')
144143
@mock.patch('framework.auth.cas.CasClient.service_validate')

0 commit comments

Comments
 (0)