def test_try_to_paginate_non_paginated(self): self.loader.load_data.side_effect = exceptions.DataNotFoundError( data_path='/foo') creator = self.create_client_creator() service_client = creator.create_client('myservice', 'us-west-2') with self.assertRaises(exceptions.OperationNotPageableError): service_client.get_paginator('test_operation')
def test_service_has_no_waiter_configs(self): self.loader.load_data.side_effect = exceptions.DataNotFoundError( data_path='/foo') creator = self.create_client_creator() service_client = creator.create_client('myservice', 'us-west-2') self.assertEqual(service_client.waiter_names, []) with self.assertRaises(ValueError): service_client.get_waiter("unknown_waiter")
def test_service_has_no_pagination_configs(self): # This is the case where there is an actual *.paginator.json, file, # but the specific operation itself is not actually pageable. # If the loader cannot load pagination configs, it communicates # this by raising a DataNotFoundError. self.loader.load_data.side_effect = exceptions.DataNotFoundError( data_path='/foo') creator = self.create_client_creator() service_client = creator.create_client('myservice', 'us-west-2') self.assertFalse(service_client.can_paginate('test_operation'))