THRIFT-242. python: Used named arguments in __init__ instead of a dict
This is a wire-compatible but non-source-compatible change.
When initializing structures, you must use
Foo(bar=1, baz="qux")
Foo(**{"bar": 1, "baz": "qux"})
instead of
Foo({"bar": 1, "baz": "qux"})
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@734536 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/py/SerializationTest.py b/test/py/SerializationTest.py
index 3b34661..4be8b8c 100755
--- a/test/py/SerializationTest.py
+++ b/test/py/SerializationTest.py
@@ -14,25 +14,25 @@
class AbstractTest(unittest.TestCase):
def setUp(self):
- self.v1obj = VersioningTestV1(d=dict(
+ self.v1obj = VersioningTestV1(
begin_in_both=12345,
end_in_both=54321,
- ))
+ )
- self.v2obj = VersioningTestV2(d=dict(
+ self.v2obj = VersioningTestV2(
begin_in_both=12345,
newint=1,
newbyte=2,
newshort=3,
newlong=4,
newdouble=5.0,
- newstruct=Bonk(d=dict(message="Hello!", type=123)),
+ newstruct=Bonk(message="Hello!", type=123),
newlist=[7,8,9],
newset=[42,1,8],
newmap={1:2,2:3},
newstring="Hola!",
end_in_both=54321,
- ))
+ )
def _serialize(self, obj):
trans = TTransport.TMemoryBuffer()