コード例 #1
0
 def testParseEnvUnsubscribeData5(self):
     testpu = parseEnvelopeData(
         '[0, "s:\\/\\/auth.b\\/path\\/type\\/d#frag", **]')
     testpu = parseEnvelopeData(
         '["forward", ' + '[["R1","R2","R3"], ' +
         '"http://id.webbrick.co.uk/events/subscribe", "agent", ' +
         '[0, "s:\\/\\/auth.b\\/path\\/type\\/d#frag", **]]]')
     assert testpu is None
コード例 #2
0
 def testParseEnvUnsubscribeData5(self):
     testpu = parseEnvelopeData('[0, "s:\\/\\/auth.b\\/path\\/type\\/d#frag", **]')
     testpu = parseEnvelopeData(
         '["forward", '+
          '[["R1","R2","R3"], '+
           '"http://id.webbrick.co.uk/events/subscribe", "agent", '+
           '[0, "s:\\/\\/auth.b\\/path\\/type\\/d#frag", **]]]')
     assert testpu is None
コード例 #3
0
 def testParseEnvSubscribeData3(self):
     testps = parseEnvelopeData(
         '["forward", '+
          '[["R1","R2","R3"], '+
           '"http://id.webbrick.co.uk/events/subscribe", "agent", '+
           '[11, **, "s:\\/\\/auth.b\\/path\\/source\\/d#frag"]]]')
     assert testps is None
コード例 #4
0
 def testParseEnvUnsubscribeData2(self):
     testpu = parseEnvelopeData(
         '["forward", ' + '[["R1","R2","R3"], ' +
         '"http://id.webbrick.co.uk/events/subscribe", "agent", ' +
         '[0, null, "s:\\/\\/auth.b\\/path\\/source\\/d#frag"]]]')
     self.assertEqual(testpu,
                      [["R1", "R2", "R3"], URI.EventSubscribeType, "agent",
                       [0, None, 's://auth.b/path/source/d#frag']])
コード例 #5
0
 def testParseEnvUnsubscribeData3(self):
     testpu = parseEnvelopeData(
         '["forward", ' + '[["R1","R2","R3"], ' +
         '"http://id.webbrick.co.uk/events/subscribe", "agent", ' +
         '[0, "s://auth.b/path/type/d#frag", null]]]')
     self.assertEqual(testpu,
                      [["R1", "R2", "R3"], URI.EventSubscribeType, "agent",
                       [0, 's://auth.b/path/type/d#frag', None]])
コード例 #6
0
 def testParseEnvUnsubscribeData3(self):
     testpu = parseEnvelopeData(
         '["forward", '+
          '[["R1","R2","R3"], '+
           '"http://id.webbrick.co.uk/events/subscribe", "agent", '+
           '[0, "s://auth.b/path/type/d#frag", null]]]')
     self.assertEqual(testpu, 
         [["R1","R2","R3"], URI.EventSubscribeType, "agent",
          [0, 's://auth.b/path/type/d#frag', None]] )
コード例 #7
0
 def testParseEnvUnsubscribeData2(self):
     testpu = parseEnvelopeData(
         '["forward", '+
          '[["R1","R2","R3"], '+
           '"http://id.webbrick.co.uk/events/subscribe", "agent", '+
           '[0, null, "s:\\/\\/auth.b\\/path\\/source\\/d#frag"]]]')
     self.assertEqual(testpu, 
         [["R1","R2","R3"], URI.EventSubscribeType, "agent",
          [0, None, 's://auth.b/path/source/d#frag']] )
コード例 #8
0
 def testParseEnvSubscribeData1(self):
     testps = parseEnvelopeData(
         '["forward", '+
          '[["R1","R2","R3"], '+
           '"http://id.webbrick.co.uk/events/subscribe", "agent", '+
           '[11, "s://auth.b/path/type/d#frag", "s://auth.b/path/source/d#frag"]]]')
     self.assertEqual(testps, 
         [["R1","R2","R3"], URI.EventSubscribeType, "agent",
          [11, 's://auth.b/path/type/d#frag', 's://auth.b/path/source/d#frag']] )
コード例 #9
0
 def testParseEnvSubscribeData1(self):
     testps = parseEnvelopeData(
         '["forward", ' + '[["R1","R2","R3"], ' +
         '"http://id.webbrick.co.uk/events/subscribe", "agent", ' +
         '[11, "s://auth.b/path/type/d#frag", "s://auth.b/path/source/d#frag"]]]'
     )
     self.assertEqual(testps,
                      [["R1", "R2", "R3"], URI.EventSubscribeType, "agent",
                       [
                           11, 's://auth.b/path/type/d#frag',
                           's://auth.b/path/source/d#frag'
                       ]])
コード例 #10
0
 def testParseEnvSubscribeData3(self):
     testps = parseEnvelopeData(
         '["forward", ' + '[["R1","R2","R3"], ' +
         '"http://id.webbrick.co.uk/events/subscribe", "agent", ' +
         '[11, **, "s:\\/\\/auth.b\\/path\\/source\\/d#frag"]]]')
     assert testps is None
コード例 #11
0
 def testParseEnvelopeData4(self):
     testpe4 = parseEnvelopeData(
         '["forward", [(<R1>,<R2>,<R3>),<ev:typ>,**,"payload"]]')
     assert testpe4 is None
コード例 #12
0
 def testParseEnvelopeData3(self):
     testpe3 = parseEnvelopeData(
         '["forward", [(<R1>,<R2>,<R3>),**,<ev:src>,"payload"]]')
     assert testpe3 is None
コード例 #13
0
 def testParseEnvelopeData2(self):
     testpe2 = parseEnvelopeData(
         '["forward", [["R1",null,"R3"], null, "ev:src", null]]')
     self.assertEqual(testpe2, [["R1", None, "R3"], None, "ev:src", None])
コード例 #14
0
 def testParseEnvelopeData2(self):
     testpe2 = parseEnvelopeData('["forward", [["R1",null,"R3"], null, "ev:src", null]]')
     self.assertEqual(testpe2, [["R1",None,"R3"], None, "ev:src", None])
コード例 #15
0
 def testParseEnvelopeData4(self):
     testpe4 = parseEnvelopeData('["forward", [(<R1>,<R2>,<R3>),<ev:typ>,**,"payload"]]')
     assert testpe4 is None
コード例 #16
0
 def testParseEnvelopeData3(self):
     testpe3 = parseEnvelopeData('["forward", [(<R1>,<R2>,<R3>),**,<ev:src>,"payload"]]')
     assert testpe3 is None
コード例 #17
0
 def testParseEnvelopeData1(self):
     testpe1 = parseEnvelopeData(
         '["forward", [["R1","R2","R3"],"ev:typ","ev:src","payload"]]')
     self.assertEqual(testpe1,
                      [["R1", "R2", "R3"], "ev:typ", "ev:src", "payload"])
コード例 #18
0
 def testParseEnvelopeData1(self):
     testpe1 = parseEnvelopeData('["forward", [["R1","R2","R3"],"ev:typ","ev:src","payload"]]')
     self.assertEqual(testpe1, [["R1","R2","R3"], "ev:typ", "ev:src", "payload"])