def build_cti_responses(self):
        """Prepare mock responses for queries through the requests package."""
        responses.post(
            url=f"{URL}/auth/token/",
            match=[
                matchers.urlencoded_params_matcher(dict(username=USER, password=TOKEN))
            ],
            json=dict(access=CTI_TOKEN),
        )

        cti_header = {
            "Authorization": f"Bearer {CTI_TOKEN}",
            "Content-Type": "application/json",
            "Accept": "application/json",
        }

        endpoint_first_page_json = dict(
            next=SECOND_PAGE_URL, results=[dict(index=f"r{i}") for i in range(2)]
        )
        responses.get(
            url=f"{URL}/cti/{ENDPOINT}",
            headers=cti_header,
            json=endpoint_first_page_json,
        )

        endpoint_second_page_json = dict(
            next=None, results=[dict(index=f"r{i}") for i in range(2, 4)]
        )
        responses.get(
            url=SECOND_PAGE_URL, headers=cti_header, json=endpoint_second_page_json
        )
Prepare mock responses for queries through the requests package.
Solutions/ZeroFox/Data Connectors/CTI/AzureFunctionZeroFoxCTI/tests/ZeroFox_test.py