Generalize decorator code.
This commit is contained in:
parent
9076e48fee
commit
d3df810065
21 changed files with 53 additions and 160 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue