Fixed test_12 to use instanceof instead of __class__ and skipped test_39 until proton bug gets fixed
@@ -410,6 +410,7 @@ class OneRouterTest(TestCase):
Tests connection property that is a binary map. The router ignores AMQP binary data type.
Router should not return anything for connection properties
"""
+ self.skipTest("Skipped until proton bug fixed.")
connection = BlockingConnection(self.router.addresses[0],
timeout=60,
properties=CONNECTION_PROPERTIES_BINARY)
@@ -520,7 +521,7 @@ class RouterProxy(object):
def response(self, msg):
ap = msg.properties
bd = msg.body
- if bd.__class__ == dict and 'results' in bd and 'attributeNames' in bd:
+ if isinstance(bd, dict) and 'results' in bd and 'attributeNames' in bd:
##
## This is a query response
##
@@ -1986,9 +1987,10 @@ class StripMessageAnnotationsNoAddTrace ( MessagingHandler ) :
notes = event.message.annotations
- if notes.__class__ != dict :
+ if not isinstance(notes, dict):
self.bail("annotations are not a dictionary")
return
+
# No annotations should get stripped -- neither the
# ones that the router adds, not the custome one that
# I added.
