No class docstring
Method fakeVerifier Undocumented
Method setUp Undocumented
Method test__extractHeaderFailsWithMissingHeader _extractHeader raises txghbot.InvalidData when the headers do not contain the requested header.
Method test__extractHeaderFailsWithNonASCIIValue _extractHeader raises txghbot.InvalidData and logs the decoding error when the requested header's first value is not ASCII.
Method test__extractHeaderSucceedsWithFirstASCIIValue _extractHeader returns a unicode/str representing the first value for the requested header.
Method test__deserializeContentFailsWithNonUTF8Payload _deserializeContent raises txghbot.InvalidData and logs the decoding error when attempting to decode a non-UTF8 encoded payload.
Method test__deserializeContentFailsWithInvalidJSON _deserializeContent raises txghbot.InvalidData and logs the underlying deserialization exception when attempting to deserialize invalid JSON.
Method test__deserializeContentSucceedsWithUTF8_JSON _deserializeContent successfully decodes and deserializes. UTF-8 encoded JSON.
Method test__matchHookReturnsFalseOnException _matchHook returns False if the IWebhook's match method raises an Exception.
Method test__matchHookReturnsHookResult _matchHook returns whatever the IWebhook's match method returns.
Method test__processHookResultsFailsWithBadRequest _processHookResults sets a status code of 400, logs the failure, and finishes the request if one or more of the hooks has failed.
Method test__processHookResultsSucceedsWithOK _processHookResults sets a status code of 200 and finishes the request if all hooks have run without raising an exception.
Method test_render_POSTFailsWithPermissionDeniedOnInvalidHMAC An invalid signature results in a 403 and no hooks running.
Method test_render_POSTFailsWithBadRequestOnInvalidHeaders If its headers lack the necessary metadata, the request fails with a 400 and no hooks are run.
Method test_render_POSTFailsWithBadRequestOnInvalidContent If its content cannot be decoded, the request fails with a 400 and no hooks are run.
Method test_render_POSTDoesNotRunNonMatchingHooks Webhooks that do not match the event aren't run.
def fakeVerifier(self, signature, headers):
Undocumented
def setUp(self):
Undocumented
def test__extractHeaderFailsWithMissingHeader(self):

_extractHeader raises txghbot.InvalidData when the headers do not contain the requested header.

def test__extractHeaderFailsWithNonASCIIValue(self):

_extractHeader raises txghbot.InvalidData and logs the decoding error when the requested header's first value is not ASCII.

def test__extractHeaderSucceedsWithFirstASCIIValue(self):

_extractHeader returns a unicode/str representing the first value for the requested header.

def test__deserializeContentFailsWithNonUTF8Payload(self):

_deserializeContent raises txghbot.InvalidData and logs the decoding error when attempting to decode a non-UTF8 encoded payload.

def test__deserializeContentFailsWithInvalidJSON(self):

_deserializeContent raises txghbot.InvalidData and logs the underlying deserialization exception when attempting to deserialize invalid JSON.

def test__deserializeContentSucceedsWithUTF8_JSON(self):

_deserializeContent successfully decodes and deserializes. UTF-8 encoded JSON.

def test__matchHookReturnsFalseOnException(self):

_matchHook returns False if the IWebhook's match method raises an Exception.

def test__matchHookReturnsHookResult(self):

_matchHook returns whatever the IWebhook's match method returns.

def test__processHookResultsFailsWithBadRequest(self):

_processHookResults sets a status code of 400, logs the failure, and finishes the request if one or more of the hooks has failed.

def test__processHookResultsSucceedsWithOK(self):

_processHookResults sets a status code of 200 and finishes the request if all hooks have run without raising an exception.

def test_render_POSTFailsWithPermissionDeniedOnInvalidHMAC(self):

An invalid signature results in a 403 and no hooks running.

def test_render_POSTFailsWithBadRequestOnInvalidHeaders(self):

If its headers lack the necessary metadata, the request fails with a 400 and no hooks are run.

def test_render_POSTFailsWithBadRequestOnInvalidContent(self):

If its content cannot be decoded, the request fails with a 400 and no hooks are run.

def test_render_POSTDoesNotRunNonMatchingHooks(self):

Webhooks that do not match the event aren't run.

API Documentation for txghbot, generated by pydoctor at 2016-10-15 18:50:32.