Example #1
0
 def test_is_empty_is_true_for_empty(self):
     encodable = amqp.encodable_factory(self.type_name, {})
     self.assertTrue(encodable.is_empty())
 def test_append_raises_typeerror(self):
     array = amqp.encodable_factory('array', [])
     member1 = amqp.encodable_factory('uint', 1)
     member2 = amqp.encodable_factory('symbol', 'foo')
     array.append(member1)
     self.assertRaises(TypeError, array.append, member2)
 def test_encode_with_symbolic_descriptor(self):
     encodable = amqp.encodable_factory(
         self.type_name, self.values, sd=self.symbolic)
     self.encode_parse_tree_decode(encodable)
 def test_as_dto_returns_input(self):
     encodable = amqp.encodable_factory(self.type_name, self.values)
     self.assertEqual(encodable.as_dto(), self.values)
 def test_encode(self):
     encodable = amqp.encodable_factory(self.type_name, self.values)
     self.encode_parse_tree_decode(encodable)