MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / testShouldCreateTwoFactorException

Method testShouldCreateTwoFactorException

tests/Requester.py:447–467  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

445 )
446
447 def testShouldCreateTwoFactorException(self):
448 exc = self.g._Github__requester.createException(
449 401,
450 {"x-github-otp": "required; app"},
451 {
452 "message": "Must specify two-factor authentication OTP code.",
453 "documentation_url": "https://developer.github.com/v3/auth#working-with-two-factor-authentication",
454 },
455 )
456 self.assertException(
457 exc,
458 github.TwoFactorException,
459 None,
460 401,
461 {
462 "message": "Must specify two-factor authentication OTP code.",
463 "documentation_url": "https://developer.github.com/v3/auth#working-with-two-factor-authentication",
464 },
465 {"x-github-otp": "required; app"},
466 '401 {"message": "Must specify two-factor authentication OTP code.", "documentation_url": "https://developer.github.com/v3/auth#working-with-two-factor-authentication"}',
467 )
468
469 def testShouldCreateBadUserAgentException(self):
470 exc = self.g._Github__requester.createException(

Callers

nothing calls this directly

Calls 2

assertExceptionMethod · 0.95
createExceptionMethod · 0.80

Tested by

no test coverage detected