diff --git a/test/unit/app/authnz/test_custos_authnz.py b/test/unit/app/authnz/test_custos_authnz.py index f0f35ab43b0d..d8cba4ae9e6b 100644 --- a/test/unit/app/authnz/test_custos_authnz.py +++ b/test/unit/app/authnz/test_custos_authnz.py @@ -344,7 +344,7 @@ def test_callback_nonce_validation_with_bad_nonce(self): self.test_nonce_hash = self.test_nonce_hash + "Z" # self.custos_authnz._fetch_token = fetch_token - with self.assertRaisesRegex(Exception, "^Nonce mismatch!$"): + with self.assertRaisesRegex(Exception, "^Nonce mismatch"): self.custos_authnz.callback( state_token="xxx", authz_code=self.test_code,