Skip to content

Commit

Permalink
Integration tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleknap committed Oct 13, 2015
1 parent 3e84a64 commit de0eb74
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions boto3/resources/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,6 @@ def load_from_definition(self, service_name, resource_name,

self._load_batch_actions(
attrs, resource_name, model, service_model, event_emitter)
self._load_documented_collection_methods(
attrs, resource_name, model, service_model, event_emitter)

if service_name == resource_name:
cls_name = '{0}.{1}Collection'.format(
Expand All @@ -408,6 +406,9 @@ def load_from_definition(self, service_name, resource_name,
collection_cls = type(str(cls_name), (ResourceCollection,),
attrs)

self._load_documented_collection_methods(
attrs, resource_name, model, service_model,
event_emitter)
attrs['_collection_cls'] = collection_cls
cls_name += 'Manager'

Expand All @@ -428,7 +429,6 @@ def _load_batch_actions(self, attrs, resource_name, model,
def _load_documented_collection_methods(factory_self, attrs, resource_name,
collection_model, service_model,
event_emitter):

# The CollectionManger already has these methods defined. However
# the docstrings are generic and not based for a particular service
# or resource. So we override these methods by proxying to the
Expand All @@ -437,7 +437,7 @@ def _load_documented_collection_methods(factory_self, attrs, resource_name,

# A collection's all() method.
def all(self):
return CollectionManager.iterator(self)
return CollectionManager.all(self)

all.__doc__ = docstring.CollectionMethodDocstring(
resource_name=resource_name,
Expand All @@ -451,7 +451,7 @@ def all(self):

# The collection's filter() method.
def filter(self, **kwargs):
return CollectionManager.iterator(self, **kwargs)
return CollectionManager.filter(self, **kwargs)

filter.__doc__ = docstring.CollectionMethodDocstring(
resource_name=resource_name,
Expand All @@ -465,7 +465,7 @@ def filter(self, **kwargs):

# The collection's limit method.
def limit(self, count):
return CollectionManager.iterator(self, limit=count)
return CollectionManager.limit(self, count)

limit.__doc__ = docstring.CollectionMethodDocstring(
resource_name=resource_name,
Expand All @@ -479,7 +479,7 @@ def limit(self, count):

# The collection's page_size method.
def page_size(self, count):
return CollectionManger.iterator(self, page_size=count)
return CollectionManager.iterator(count)

page_size.__doc__ = docstring.CollectionMethodDocstring(
resource_name=resource_name,
Expand Down

0 comments on commit de0eb74

Please sign in to comment.