32 [
"a",
"json",
"array"],
33 {
"a":
"json",
"object": [
"with",
"nested",
False, 1.23]},
46 msg = json_transport.PackedJson(d)
47 self.assertEquals(d, msg.data)
50 data = [
"a",
"json",
"array"]
52 json_transport.PackedJson(data=data, schema={
"maxItems": 3})
54 with self.assertRaises(json_transport.ValidationError):
55 json_transport.PackedJson(data=data, schema={
"maxItems": 2})
58 if __name__ ==
'__main__':
60 rosunit.unitrun(
'json_transport',
'test_packed_json', TestPackedJson)
def test_init_packed_json_schema(self)
def test_init_packed_json(self)