diff --git a/sanic/request.py b/sanic/request.py index 7ca5523c..5c4a7db4 100644 --- a/sanic/request.py +++ b/sanic/request.py @@ -25,6 +25,9 @@ class RequestParameters(dict): self.super = super() self.super.__init__(*args, **kwargs) + def __getitem__(self, name): + return self.get(name) + def get(self, name, default=None): values = self.super.get(name) return values[0] if values else default diff --git a/tests/tests_server_events.py b/tests/test_server_events.py similarity index 100% rename from tests/tests_server_events.py rename to tests/test_server_events.py