Esempio n. 1
0
    def test_policy_fetch_request_is_called_with_an_event_id(self):
        with mock_response():
            cased.api_key = "cs_test_001"

            assert Policy.fetch("1234")

            cased.http.HTTPClient.make_request.assert_called_with(
                "get", "https://api.cased.com/policies/1234", "cs_test_001",
                None)
Esempio n. 2
0
    def test_policy_can_fetch(self):
        with mock_response():
            cased.api_key = "cs_test_001"

            assert Policy.fetch("1234").status_code == 200