diff options
author | Aleksey Lim <alsroot@sugarlabs.org> | 2012-11-15 18:24:59 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@sugarlabs.org> | 2012-11-15 18:24:59 (GMT) |
commit | 60fa4a35ecdca97fe5c18e3cf3e0960151d6530c (patch) | |
tree | 4a381e70914e1c49930555f78ecbc82d0c8e3c96 | |
parent | 35cf4bac15cfbf7b2a1354dd8f45269d41b84ac3 (diff) |
Polish implementation, accepts standard dict ctor arguments for Request
-rw-r--r-- | active_document/commands.py | 4 | ||||
-rwxr-xr-x | tests/units/commands.py | 2 | ||||
-rwxr-xr-x | tests/units/volume.py | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/active_document/commands.py b/active_document/commands.py index 58cb53f..235b9af 100644 --- a/active_document/commands.py +++ b/active_document/commands.py @@ -95,9 +95,7 @@ class Request(dict): commands = None response = None - def __init__(self, props_=None, **kwargs): - if props_ is not None: - kwargs = props_ + def __init__(self, **kwargs): dict.__init__(self, kwargs) self._pos = 0 diff --git a/tests/units/commands.py b/tests/units/commands.py index d2dc35f..ff6a4b7 100755 --- a/tests/units/commands.py +++ b/tests/units/commands.py @@ -481,7 +481,7 @@ class CommandsTest(tests.Test): content_stream = None content_length = 0 - request = TestRequest(kwargs) + request = TestRequest(**kwargs) request['method'] = method request.access_level = access_level if document: diff --git a/tests/units/volume.py b/tests/units/volume.py index a1b4021..40a0cae 100755 --- a/tests/units/volume.py +++ b/tests/units/volume.py @@ -946,7 +946,7 @@ class VolumeTest(tests.Test): content_stream = None content_length = 0 - request = TestRequest(kwargs) + request = TestRequest(**kwargs) request.content = content request.content_stream = content_stream request.content_type = content_type |