Generalize decorator code.
This commit is contained in:
parent
9076e48fee
commit
d3df810065
21 changed files with 53 additions and 160 deletions
|
|
@ -1,13 +1,7 @@
|
|||
from __future__ import unicode_literals
|
||||
from .models import lambda_backends
|
||||
from ..core.models import MockAWS
|
||||
from ..core.models import MockAWS, base_decorator
|
||||
|
||||
|
||||
lambda_backend = lambda_backends['us-east-1']
|
||||
|
||||
|
||||
def mock_lambda(func=None):
|
||||
if func:
|
||||
return MockAWS(lambda_backends)(func)
|
||||
else:
|
||||
return MockAWS(lambda_backends)
|
||||
mock_lambda = base_decorator(lambda_backends)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue