(self)
| 454 | await self.connect(user=self.realm.user_princ, krbsrvname='wrong') |
| 455 | |
| 456 | async def test_auth_gssapi_bad_user(self): |
| 457 | # Credentials mismatch. |
| 458 | with self.assertRaisesRegex( |
| 459 | exceptions.InvalidAuthorizationSpecificationError, |
| 460 | 'GSSAPI authentication failed for user' |
| 461 | ): |
| 462 | await self.connect(user=f'wrong-{self.realm.user_princ}') |
| 463 | |
| 464 | |
| 465 | @unittest.skipIf(_system != 'Windows', 'SSPI is only available on Windows') |