moto/scripts/template/lib/models.py.j2
2021-12-24 20:02:45 -01:00

23 lines
649 B
Django/Jinja

"""{{ service_class }}Backend class with methods for supported APIs."""
from moto.core import BaseBackend, BaseModel
from moto.core.utils import BackendDict
class {{ service_class }}Backend(BaseBackend):
"""Implementation of {{ service_class }} APIs."""
def __init__(self, region_name=None):
self.region_name = region_name
def reset(self):
"""Re-initialize all attributes for this instance."""
region_name = self.region_name
self.__dict__ = {}
self.__init__(region_name)
# add methods from here
{{ escaped_service }}_backends = BackendDict({{ service_class }}Backend, "{{ service }}")