def test_can_create_all_resources(resource_args): """Verify we can create all existing resources.""" session, service_name = resource_args resource = session.resource(service_name) # Verifying we have a "meta" attr is just an arbitrary # sanity check. assert hasattr(resource, 'meta')
def test_can_inject_method_onto_resource(self): session = ibm_boto3.Session(botocore_session=self.botocore_session) self.botocore_session.register('creating-resource-class.s3', self.add_new_method(name='my_method')) resource = session.resource('s3') self.assertTrue(hasattr(resource, 'my_method')) self.assertEqual(resource.my_method('anything'), 'anything')
def _test_create_resource(session, service_name): resource = session.resource(service_name) # Verifying we have a "meta" attr is just an arbitrary # sanity check. assert_true(hasattr(resource, 'meta'))