Esempio n. 1
0
 def test_valid_uris_strict_nonempty(self):
     for u in [
             u"com.myapp.topic1",
             u"com.myapp.product.123",
             u"com.myapp.product.1.delete",
     ]:
         self.assertEqual(u, message.check_or_raise_uri(u, strict=True))
Esempio n. 2
0
 def test_valid_uris_strict_empty(self):
     for u in [u"com.myapp.topic1",
               u"com.myapp..123",
               u"com.myapp.product.1.",
               u"com.",
               u".",
               u"",
               ]:
         self.assertEqual(u, message.check_or_raise_uri(u, strict=True, allow_empty_components=True))
 def test_valid_uris_strict_empty(self):
     for u in ["com.myapp.topic1",
               "com.myapp..123",
               "com.myapp.product.1.",
               "com.",
               ".",
               "",
               ]:
         self.assertEqual(u, message.check_or_raise_uri(u, strict=True, allow_empty_components=True))
Esempio n. 4
0
 def test_valid_uris_loose_nonempty(self):
     for u in [u"com.myapp.topic1",
               u"com.myapp.product.123",
               u"com.myapp.product.1.delete",
               u"Com-star.MyApp.**+$for",
               u"\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5",
               u"hello\x24world",
               u"hello\xC2\xA2world",
               u"hello\xE2\x82\xACworld",
               u"hello\xF0\xA4\xAD\xA2world",
               ]:
         self.assertEqual(u, message.check_or_raise_uri(u))
 def test_valid_uris_loose_nonempty(self):
     for u in ["com.myapp.topic1",
               "com.myapp.product.123",
               "com.myapp.product.1.delete",
               "Com-star.MyApp.**+$for",
               "\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5",
               "hello\x24world",
               "hello\xC2\xA2world",
               "hello\xE2\x82\xACworld",
               "hello\xF0\xA4\xAD\xA2world",
               ]:
         self.assertEqual(u, message.check_or_raise_uri(u))
Esempio n. 6
0
 def test_valid_uris_loose_empty(self):
     for u in [u"com.myapp.topic1",
               u"com.myapp..123",
               u"com.myapp.product.1.",
               u"com.",
               u".",
               u"",
               u"Com-star.MyApp.**+$for..foo",
               u"\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5..foo",
               u"hello\x24world..foo",
               u"hello\xC2\xA2world..foo",
               u"hello\xE2\x82\xACworld..foo",
               u"hello\xF0\xA4\xAD\xA2world..foo",
               ]:
         self.assertEqual(u, message.check_or_raise_uri(u, allow_empty_components=True))
 def test_valid_uris_loose_empty(self):
     for u in ["com.myapp.topic1",
               "com.myapp..123",
               "com.myapp.product.1.",
               "com.",
               ".",
               "",
               "Com-star.MyApp.**+$for..foo",
               "\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5..foo",
               "hello\x24world..foo",
               "hello\xC2\xA2world..foo",
               "hello\xE2\x82\xACworld..foo",
               "hello\xF0\xA4\xAD\xA2world..foo",
               ]:
         self.assertEqual(u, message.check_or_raise_uri(u, allow_empty_components=True))
Esempio n. 8
0
 def test_valid_uris_strict_nonempty(self):
     for u in [u"com.myapp.topic1",
               u"com.myapp.product.123",
               u"com.myapp.product.1.delete",
               ]:
         self.assertEqual(u, message.check_or_raise_uri(u, strict=True))