async def test_failure_2(self): app = AsyncApp( client=self.web_client, signing_secret=self.signing_secret, ) request = self.build_valid_request() response = await app.async_dispatch(request) assert response.status == 404 assert self.mock_received_requests["/auth.test"] == 1 app.block_suggestion("mes_a")(show_multi_options) response = await app.async_dispatch(request) assert response.status == 404 assert self.mock_received_requests["/auth.test"] == 1
async def test_success_2(self): app = AsyncApp( client=self.web_client, signing_secret=self.signing_secret, ) app.block_suggestion("es_a")(show_options) request = self.build_valid_request() response = await app.async_dispatch(request) assert response.status == 200 assert response.body == expected_response_body assert response.headers["content-type"][ 0] == "application/json;charset=utf-8" assert self.mock_received_requests["/auth.test"] == 1
async def test_failure_2(self): app = AsyncApp( client=self.web_client, signing_secret=self.signing_secret, ) request = self.build_valid_request() response = await app.async_dispatch(request) assert response.status == 404 await assert_auth_test_count_async(self, 1) app.block_suggestion("mes_a")(show_multi_options) response = await app.async_dispatch(request) assert response.status == 404 await assert_auth_test_count_async(self, 1)