def test_can_inject_method_onto_resource(self):
    session = 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_can_inject_method_onto_resource(self):
    session = 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')