Generalize decorator code.

This commit is contained in:
Steve Pulec 2017-02-12 00:22:29 -05:00
commit d3df810065
21 changed files with 53 additions and 160 deletions

View file

@ -1,11 +1,5 @@
from .models import cloudwatch_backends
from ..core.models import MockAWS
from ..core.models import MockAWS, base_decorator
cloudwatch_backend = cloudwatch_backends['us-east-1']
def mock_cloudwatch(func=None):
if func:
return MockAWS(cloudwatch_backends)(func)
else:
return MockAWS(cloudwatch_backends)
mock_cloudwatch = base_decorator(cloudwatch_backends)