def test_absent_when_nuke_api_and_no_more_stages_deployments_remain(self):
        self.conn.get_rest_apis.return_value = apis_ret
        self.conn.get_stage.return_value = stage1_deployment1_ret
        self.conn.delete_stage.return_value = {'ResponseMetadata': {'HTTPStatusCode': 200, 'RequestId': '2d31072c-9d15-11e5-9977-6d9fcfda9c0a'}}
        self.conn.get_stages.return_value = no_stages_ret
        self.conn.get_deployments.return_value = deployments_ret
        self.conn.delete_rest_api.return_value = {'ResponseMetadata': {'HTTPStatusCode': 200, 'RequestId': '2d31072c-9d15-11e5-9977-6d9fcfda9c0a'}}

        result = salt_states['boto_apigateway.absent'](
                    'api present',
                    'unit test api',
                    'test',
                    nuke_api=True,
                    **conn_parameters)

        self.assertIs(result.get('result'), True)
        self.assertIsNot(result.get('abort'), True)
        self.assertIs(result.get('changes', {}).get('new', [{}])[0].get('delete_api', {}).get('deleted'), True)
Get a fake request object that has some stuff we need on it
dataset/ETHPy150Open saltstack/salt/tests/unit/states/boto_apigateway_test.py/BotoApiGatewayTestCase.test_absent_when_nuke_api_and_no_more_stages_deployments_remain--crossover with--dataset/ETHPy150Open jamesmfriedman/django-easytz/easytz/tests.py/TimezoneTestCase.get_request