MCPcopy Create free account
hub / github.com/apache/thrift / _assertDictEqual

Method _assertDictEqual

test/py/TSimpleJSONProtocolTest.py:33–43  ·  view source on GitHub ↗
(self, a, b, msg=None)

Source from the content-addressed store, hash-verified

31 protocol_factory = TJSONProtocol.TSimpleJSONProtocolFactory()
32
33 def _assertDictEqual(self, a, b, msg=None):
34 if hasattr(self, 'assertDictEqual'):
35 # assertDictEqual only in Python 2.7. Depends on your machine.
36 self.assertDictEqual(a, b, msg)
37 return
38
39 # Substitute implementation not as good as unittest library's
40 self.assertEquals(len(a), len(b), msg)
41 for k, v in a.iteritems():
42 self.assertTrue(k in b, msg)
43 self.assertEquals(b.get(k), v, msg)
44
45 def _serialize(self, obj):
46 trans = TTransport.TMemoryBuffer()

Callers 2

testSimpleMessageMethod · 0.95
testComplicatedMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected