From fae22fd8723999592ecb519723d3bd75d053aa59 Mon Sep 17 00:00:00 2001 From: James Porter Date: Thu, 2 Apr 2015 22:40:40 -0500 Subject: [PATCH] allow starting without reseting --- moto/core/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/moto/core/models.py b/moto/core/models.py index 495c9a382..be25321c7 100644 --- a/moto/core/models.py +++ b/moto/core/models.py @@ -29,10 +29,11 @@ class MockAWS(object): def __exit__(self, *args): self.stop() - def start(self): + def start(self, reset=True): self.__class__.nested_count += 1 - for backend in self.backends.values(): - backend.reset() + if reset: + for backend in self.backends.values(): + backend.reset() if not HTTPretty.is_enabled(): HTTPretty.enable()