def testChar(self):
   """Tests a DAFSA can be created from a single character domain name."""
   words = [ 'a0' ]
   node2 = ( chr(0), [ None ] )
   node1 = ( 'a', [ node2 ] )
   source = [ node1 ]
   self.assertEqual(make_dafsa.to_dafsa(words), source)
Exemple #2
0
 def testChar(self):
   """Tests a DAFSA can be created from a single character domain name."""
   words = [ 'a0' ]
   node2 = ( chr(0), [ None ] )
   node1 = ( 'a', [ node2 ] )
   source = [ node1 ]
   self.assertEqual(make_dafsa.to_dafsa(words), source)
Exemple #3
0
 def testWords(self):
   """Tests a DAFSA can be created from a sequence of domain names."""
   words = [ 'a0', 'b1' ]
   node4 = ( chr(1), [ None ] )
   node3 = ( 'b', [ node4 ] )
   node2 = ( chr(0), [ None ] )
   node1 = ( 'a', [ node2 ] )
   source = [ node1, node3 ]
   self.assertEqual(make_dafsa.to_dafsa(words), source)
 def testWords(self):
   """Tests a DAFSA can be created from a sequence of domain names."""
   words = [ 'a0', 'b1' ]
   node4 = ( chr(1), [ None ] )
   node3 = ( 'b', [ node4 ] )
   node2 = ( chr(0), [ None ] )
   node1 = ( 'a', [ node2 ] )
   source = [ node1, node3 ]
   self.assertEqual(make_dafsa.to_dafsa(words), source)