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

Method testShouldCreateBadUserAgentException

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

Source from the content-addressed store, hash-verified

467 )
468
469 def testShouldCreateBadUserAgentException(self):
470 exc = self.g._Github__requester.createException(
471 403,
472 {"header": "value"},
473 {"message": "Missing or invalid User Agent string"},
474 )
475 self.assertException(
476 exc,
477 github.BadUserAgentException,
478 None,
479 403,
480 {"message": "Missing or invalid User Agent string"},
481 {"header": "value"},
482 '403 {"message": "Missing or invalid User Agent string"}',
483 )
484
485 def testShouldCreateRateLimitExceededException(self):
486 for message in self.PrimaryRateLimitErrors + self.SecondaryRateLimitErrors:

Callers

nothing calls this directly

Calls 2

assertExceptionMethod · 0.95
createExceptionMethod · 0.80

Tested by

no test coverage detected