Exemplo n.º 1
0
 def test_split_unescaped_regular(self):
     self.assertEqual(
         VCardParser.split_unescaped("Lastname;Firstname", ';'),
         ["Lastname", "Firstname"])
Exemplo n.º 2
0
 def test_split_unescaped_two(self):
     self.assertEqual(
         VCardParser.split_unescaped("Lastname\\\\;Firstname", ';'), [
             "Lastname\\\\",
             "Firstname",
         ])
Exemplo n.º 3
0
 def test_count_escapes_one(self):
     self.assertEqual(VCardParser.count_escapes("Lastname\\"), 1)
Exemplo n.º 4
0
 def test_count_escapes_two(self):
     self.assertEqual(VCardParser.count_escapes(r"Lastname\\"), 2)
Exemplo n.º 5
0
 def test_unesc_list(self):
     self.assertEqual(VCardParser.unesc(["Last\,name", "First\;name"]),
                      ["Last,name", "First;name"])
Exemplo n.º 6
0
 def test_count_escapes_null(self):
     self.assertEqual(VCardParser.count_escapes("Lastname"), 0)
Exemplo n.º 7
0
 def test_split_unescaped_three(self):
     self.assertEqual(VCardParser.split_unescaped(r"Lastname\\\;Firstname", ';'),
                      [r"Lastname\\\;Firstname",])
Exemplo n.º 8
0
 def test_unesc_list(self):
     self.assertEqual(VCardParser.unesc(["Last\,name", "First\;name"]),
                      ["Last,name", "First;name"])
Exemplo n.º 9
0
 def test_split_unescaped_regular(self):
     self.assertEqual(VCardParser.split_unescaped("Lastname;Firstname", ';'),
                      ["Lastname", "Firstname"])
Exemplo n.º 10
0
 def test_split_unescaped_two(self):
     self.assertEqual(VCardParser.split_unescaped("Lastname\\\\;Firstname", ';'),
                      ["Lastname\\\\", "Firstname",])
Exemplo n.º 11
0
 def test_count_escapes_two(self):
     self.assertEqual(VCardParser.count_escapes(r"Lastname\\"), 2)
Exemplo n.º 12
0
 def test_count_escapes_one(self):
     self.assertEqual(VCardParser.count_escapes("Lastname\\"), 1)
Exemplo n.º 13
0
 def test_count_escapes_null(self):
     self.assertEqual(VCardParser.count_escapes("Lastname"), 0)
Exemplo n.º 14
0
 def test_split_unescaped_three(self):
     self.assertEqual(
         VCardParser.split_unescaped(r"Lastname\\\;Firstname", ';'), [
             r"Lastname\\\;Firstname",
         ])
Exemplo n.º 15
0
 def test_unesc_string(self):
     self.assertEqual(VCardParser.unesc("TEL:012\\\\345\\,67\\;89"),
                      "TEL:012\\345,67;89")
Exemplo n.º 16
0
 def __init__(self, database):
     VCardParser.__init__(self, database)
Exemplo n.º 17
0
 def test_unesc_string(self):
     self.assertEqual(VCardParser.unesc("TEL:012\\\\345\\,67\\;89"),
                      "TEL:012\\345,67;89")