tests.test_api

Tests for cowbird.api module.

Module Contents

Classes

TestAPI

Test API operations of application.

Functions

test_response_metadata()

Validate that regardless of response type (success/error) and status-code, metadata details are added.

class tests.test_api.TestAPI(methodName='runTest')[source]

Bases: unittest.TestCase

Test API operations of application.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

classmethod tearDownClass()[source]

Hook method for deconstructing the class fixture after running all tests in the class.

test_homepage()[source]
test_webhooks()[source]

Test that sends a webhook request from Magpie to cowbird.

tests.test_api.test_response_metadata()[source]

Validate that regardless of response type (success/error) and status-code, metadata details are added.

note: test only locally to avoid remote server side-effects and because mock cannot be done remotely