diff --git a/moto/events/__init__.py b/moto/events/__init__.py new file mode 100644 index 000000000..8b15e852a --- /dev/null +++ b/moto/events/__init__.py @@ -0,0 +1,5 @@ +from __future__ import unicode_literals + +from .models import events_backend + +mock_events = events_backend.decorator diff --git a/moto/events/models.py b/moto/events/models.py new file mode 100644 index 000000000..f732a55a5 --- /dev/null +++ b/moto/events/models.py @@ -0,0 +1,58 @@ +from moto.core import BaseBackend + + +class EventsBackend(BaseBackend): + + def __init__(self): + self.events = {} + self.rules = {} + + def can_paginate(self): + pass + + def delete_rule(self): + pass + + def describe_rule(self, name): + event = self.events['name'] + + def disable_rule(self): + pass + + def enable_rule(self): + pass + + def generate_presigned_url(self): + pass + + def get_paginator(self): + pass + + def get_waiter(self): + pass + + def list_rule_names_by_target(self): + pass + + def list_rules(self): + pass + + def list_targets_by_rule(self): + pass + + def put_events(self): + pass + + def put_rule(self, name, **kwargs): + pass + + def put_targets(self): + pass + + def remove_targets(self): + pass + + def test_event_pattern(self): + pass + +events_backend = EventsBackend() diff --git a/moto/events/responses.py b/moto/events/responses.py new file mode 100644 index 000000000..7be87d03d --- /dev/null +++ b/moto/events/responses.py @@ -0,0 +1,59 @@ +import json + +from moto.core.responses import BaseResponse + + +class EventsHandler(BaseResponse): + + def error(self, type_, status=400): + return status, self.response_headers, json.dumps({'__type': type_}) + + def can_paginate(self): + pass + + def delete_rule(self): + pass + + def describe_rule(self): + pass + + def disable_rule(self): + pass + + def enable_rule(self): + pass + + def generate_presigned_url(self): + pass + + def get_paginator(self): + pass + + def get_waiter(self): + pass + + def list_rule_names_by_target(self): + pass + + def list_rules(self): + pass + + def list_targets_by_rule(self): + pass + + def put_events(self): + pass + + def put_rule(self): + if 'Name' not in self.body: + return self.error("com.amazonaws.events.validate#ValidationException") + pass + + def put_targets(self): + pass + + def remove_targets(self): + pass + + def test_event_pattern(self): + pass diff --git a/moto/events/urls.py b/moto/events/urls.py new file mode 100644 index 000000000..9484e385e --- /dev/null +++ b/moto/events/urls.py @@ -0,0 +1,11 @@ +from __future__ import unicode_literals + +from .responses import EventsHandler + +url_bases = [ + "https?://events.(.+).amazonaws.com" +] + +url_paths = { + "{0}/": EventsHandler.dispatch, +} \ No newline at end of file