def testParseMessageData5(self):
     testpm5 = parseMessageData(
         '["forward", '+
          '[["R1","R2","R3"], '+
           '"ev:typ", '+
           'null, '+
           '"payload"]]')
     self.assertEqual(testpm5, ['forward', [['R1', 'R2', 'R3'], 'ev:typ', None, 'payload']])
 def testParseMessageData4(self):
     testpm4 = parseMessageData(
         '["forward", '+
          '[["R1","R2","R3"], '+
           '"ev:typ", '+
           '**, '+
           '"payload"]]')
     assert testpm4 is None
 def testParseMessageData3(self):
     testpm3 = parseMessageData(
         '["forward", '+
          '[["R1","R2","R3"], '+
           '"ev:typ", '+
           '"ev:src", '+
           '"payload"]]')
     self.assertEqual(testpm3, ['forward', [['R1', 'R2', 'R3'], 'ev:typ', 'ev:src', 'payload']])
 def testParseMessageData2(self):
     testpm2 = parseMessageData(
         '["forward", '+
          '[[], '+
           '"s://auth.b/path/type/d#frag", '+
           '"s://auth.b/path/source/d#frag", '+
           'null]]')
     self.assertEqual(testpm2, 
         ['forward', [[], 's://auth.b/path/type/d#frag', 's://auth.b/path/source/d#frag', None]])
Exemplo n.º 5
0
 def testParseMessageData2(self):
     testpm2 = parseMessageData('["forward", ' + '[[], ' +
                                '"s://auth.b/path/type/d#frag", ' +
                                '"s://auth.b/path/source/d#frag", ' +
                                'null]]')
     self.assertEqual(testpm2, [
         'forward',
         [[], 's://auth.b/path/type/d#frag',
          's://auth.b/path/source/d#frag', None]
     ])
 def testParseMessageData1(self):
     testpm1 = parseMessageData(
         '["forward", '+
          '[["R1","R2","R3"], '+
           '"http://id.webbrick.co.uk/events/subscribe", '+
           '"ev:type", '+
           '[11, "s://auth.b/path/type/d#frag", "s://auth.b/path/source/d#frag"]]]')
     self.assertEqual(testpm1, 
         [ "forward", 
           [["R1","R2","R3"], 
           "http://id.webbrick.co.uk/events/subscribe",
           "ev:type", 
           [11, 's://auth.b/path/type/d#frag', 's://auth.b/path/source/d#frag']]])
Exemplo n.º 7
0
 def testParseMessageData1(self):
     testpm1 = parseMessageData(
         '["forward", ' + '[["R1","R2","R3"], ' +
         '"http://id.webbrick.co.uk/events/subscribe", ' + '"ev:type", ' +
         '[11, "s://auth.b/path/type/d#frag", "s://auth.b/path/source/d#frag"]]]'
     )
     self.assertEqual(testpm1, [
         "forward",
         [["R1", "R2", "R3"], "http://id.webbrick.co.uk/events/subscribe",
          "ev:type",
          [
              11, 's://auth.b/path/type/d#frag',
              's://auth.b/path/source/d#frag'
          ]]
     ])
Exemplo n.º 8
0
 def testParseMessageData9(self):
     testpm9 = parseMessageData('["idle", ["foobar"]]')
     assert testpm9 is None
Exemplo n.º 9
0
 def testParseMessageData10(self):
     testpm10 = parseMessageData('["idle"]')
     assert testpm10 is None
Exemplo n.º 10
0
 def testParseMessageData7(self):
     testpm7 = parseMessageData('["closedown", ["foobar"]]')
     assert testpm7 is None
Exemplo n.º 11
0
 def testParseMessageData8(self):
     testpm8 = parseMessageData('["idle", []]')
     self.assertEqual(testpm8, ['idle', []])
Exemplo n.º 12
0
 def testParseMessageData5(self):
     testpm5 = parseMessageData('["forward", ' + '[["R1","R2","R3"], ' +
                                '"ev:typ", ' + 'null, ' + '"payload"]]')
     self.assertEqual(
         testpm5,
         ['forward', [['R1', 'R2', 'R3'], 'ev:typ', None, 'payload']])
Exemplo n.º 13
0
 def testParseMessageData6(self):
     testpm6 = parseMessageData('["closedown", []]')
     self.assertEqual(testpm6, ['closedown', []])
     self.assertEqual(testpm6, ['closedown', []])
Exemplo n.º 14
0
 def testParseMessageData3(self):
     testpm3 = parseMessageData('["forward", ' + '[["R1","R2","R3"], ' +
                                '"ev:typ", ' + '"ev:src", ' + '"payload"]]')
     self.assertEqual(
         testpm3,
         ['forward', [['R1', 'R2', 'R3'], 'ev:typ', 'ev:src', 'payload']])
Exemplo n.º 15
0
 def testParseMessageData9(self):
     testpm9 = parseMessageData('["idle", ["foobar"]]')
     assert testpm9 is None
Exemplo n.º 16
0
 def testParseMessageData7(self):
     testpm7 = parseMessageData('["closedown", ["foobar"]]')
     assert testpm7 is None
Exemplo n.º 17
0
 def testParseMessageData6(self):
     testpm6 = parseMessageData('["closedown", []]')
     self.assertEqual(testpm6, ['closedown',[]])
     self.assertEqual(testpm6, ['closedown',[]])
Exemplo n.º 18
0
 def testParseMessageData12(self):
     testpm12 = parseMessageData('["foobar", []]')
     assert testpm12 is None
Exemplo n.º 19
0
 def testParseMessageData11(self):
     testpm11 = parseMessageData('["idle", 666]')
     assert testpm11 is None
Exemplo n.º 20
0
 def testParseMessageData10(self):
     testpm10 = parseMessageData('["idle"]')
     assert testpm10 is None
Exemplo n.º 21
0
 def testParseMessageData11(self):
     testpm11 = parseMessageData('["idle", 666]')
     assert testpm11 is None
Exemplo n.º 22
0
 def testParseMessageData4(self):
     testpm4 = parseMessageData('["forward", ' + '[["R1","R2","R3"], ' +
                                '"ev:typ", ' + '**, ' + '"payload"]]')
     assert testpm4 is None
Exemplo n.º 23
0
 def testParseMessageData12(self):
     testpm12 = parseMessageData('["foobar", []]')
     assert testpm12 is None
Exemplo n.º 24
0
 def testParseMessageData8(self):
     testpm8 = parseMessageData('["idle", []]')
     self.assertEqual(testpm8, ['idle',[]])