def testSplitDNWithQuotes(self): self.assertEqual(splitOnUnquotedCommas( 'CN="Bletch, Quux, Zart",OU="Foo, Bar, Baz",' \ 'O="Goo, Bar, Baz",L=fi,ST=gb,C=us'), ['CN="Bletch, Quux, Zart"', 'OU="Foo, Bar, Baz"', 'O="Goo, Bar, Baz"', 'L=fi', 'ST=gb', 'C=us'])
def testSplitWithQuotes(self): self.assertEqual(splitOnUnquotedCommas('a,"b,c",d,e'), ['a', '"b,c"', 'd', 'e'])
def testSplitNoQuotes(self): self.assertEqual(splitOnUnquotedCommas('a,b,c,d,e'), ['a', 'b', 'c', 'd', 'e'])
def testSplitDNWithQuotes(self): self.assertEqual(splitOnUnquotedCommas( 'CN="Bletch, Quux, Zart",OU="Foo, Bar, Baz",' \ 'O="Goo, Bar, Baz",L=fi,ST=gb,C=us'), ['CN="Bletch, Quux, Zart"', 'OU="Foo, Bar, Baz"', 'O="Goo, Bar, Baz"', 'L=fi', 'ST=gb', 'C=us'])
def testSplitWithQuotes(self): self.assertEqual(splitOnUnquotedCommas('a,"b,c",d,e'), ['a', '"b,c"', 'd', 'e'])
def testSplitNoQuotes(self): self.assertEqual(splitOnUnquotedCommas('a,b,c,d,e'), ['a', 'b', 'c', 'd', 'e'])