Skip to content

Commit

Permalink
added non friendly character to password test
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-Antoine Belanger committed Jul 16, 2020
1 parent d7bc4b4 commit 8bd7390
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/utils/test_authn_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
from oic.utils.authn.client import get_client_id

CDB = {
"number5": {"client_secret": "drickyoughurt"},
"number5": {"client_secret": "drickyoughurt*"},
"token_client": {},
"expired": {"client_secret": "drickyoughurt", "client_secret_expires_at": 1},
"expired": {"client_secret": "drickyoughurt*", "client_secret_expires_at": 1},
"secret_token": "token_client",
"expired_token": "expired",
}
Expand Down Expand Up @@ -45,11 +45,11 @@ def test_wrong_authn(self):
get_client_id(self.cdb, AuthorizationRequest(), "mumbo jumbo")

def test_basic_authn_client_ok(self):
authn = "Basic " + b64encode(b"number5:drickyoughurt").decode()
authn = "Basic " + b64encode(b"number5:drickyoughurt*").decode()
assert get_client_id(self.cdb, AuthorizationRequest(), authn)

def test_basic_authn_client_missing(self):
authn = "Basic " + b64encode(b"missing:drickyoughurt").decode()
authn = "Basic " + b64encode(b"missing:drickyoughurt*").decode()
with pytest.raises(FailedAuthentication):
get_client_id(self.cdb, AuthorizationRequest(), authn)

Expand All @@ -59,7 +59,7 @@ def test_basic_authn_client_wrongpass(self):
get_client_id(self.cdb, AuthorizationRequest(), authn)

def test_basic_authn_client_invalid(self):
authn = "Basic " + b64encode(b"expired:drickyoughurt").decode()
authn = "Basic " + b64encode(b"expired:drickyoughurt*").decode()
with pytest.raises(FailedAuthentication):
get_client_id(self.cdb, AuthorizationRequest(), authn)

Expand Down

0 comments on commit 8bd7390

Please sign in to comment.