diff --git a/moto/core/models.py b/moto/core/models.py index 055cbbd7e..fd90493b2 100644 --- a/moto/core/models.py +++ b/moto/core/models.py @@ -234,14 +234,12 @@ class BaseModel(object): class BaseBackend(object): def reset(self): + for service, models in model_data.items(): + for model_name, model in models.items(): + model.instances = [] self.__dict__ = {} self.__init__() - def get_models(self): - import pdb;pdb.set_trace() - models = getattr(backend.__class__, '__models__', {}) - - @property def _url_module(self): backend_module = self.__class__.__module__ diff --git a/moto/ec2/models.py b/moto/ec2/models.py index a26aac6a4..0c72ac648 100755 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -2633,7 +2633,7 @@ class VPCGatewayAttachment(BaseModel): @property def physical_resource_id(self): - return self.id + return self.vpc_id class VPCGatewayAttachmentBackend(object):