def test_success_2(self): app = App( client=self.web_client, signing_secret=self.signing_secret, ) app.block_action("a")(simple_listener) request = self.build_valid_request() response = app.dispatch(request) assert response.status == 200 assert_auth_test_count(self, 1)
def test_failure_2(self): app = App( client=self.web_client, signing_secret=self.signing_secret, ) request = self.build_valid_request() response = app.dispatch(request) assert response.status == 404 assert self.mock_received_requests["/auth.test"] == 1 app.block_action("aaa")(simple_listener) response = app.dispatch(request) assert response.status == 404 assert self.mock_received_requests["/auth.test"] == 2