(self)
| 144 | ) |
| 145 | |
| 146 | def testRequiredAppAuth(self): |
| 147 | # GithubIntegration requires AppAuth authentication. |
| 148 | for auth in [self.oauth_token, self.jwt, Login("login", "password")]: |
| 149 | with self.assertRaises(AssertionError) as r: |
| 150 | github.GithubIntegration(auth=auth) |
| 151 | self.assertEqual( |
| 152 | str(r.exception), |
| 153 | f"GithubIntegration requires github.Auth.AppAuth authentication, not {type(auth)}", |
| 154 | ) |
| 155 | |
| 156 | def testAppAuth(self): |
| 157 | # Replay data copied from testDeprecatedAppAuth to test parity |