How to use the apiron.client.get_required_headers function in apiron

To help you get started, we’ve selected a few apiron examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ithaka / apiron / tests / test_client.py View on Github external
def test_get_required_headers(self, mock_endpoint):
        service = mock.Mock()
        service.required_headers = {"one": "two"}
        mock_endpoint.required_headers = {"foo": "bar"}
        expected_headers = {}
        expected_headers.update(service.required_headers)
        expected_headers.update(mock_endpoint.required_headers)
        assert expected_headers == client.get_required_headers(service, mock_endpoint)