예제 #1
0
 def test_similar_pages(self):
     titles = [
         u'hello',
         u'Low',
         u'hallow',
         u'what the hell',
     ]
     actual = WikiPage._similar_titles(titles, u'lo')
     expected = {
         u'startswiths': [u'Low'],
         u'endswiths': [u'hello'],
         u'contains': [u'hallow'],
     }
     self.assertEqual(expected, actual)
예제 #2
0
 def test_similar_pages(self):
     titles = [u"hello", u"Low", u"hallow", u"what the hell"]
     actual = WikiPage._similar_titles(titles, u"lo")
     expected = {u"startswiths": [u"Low"], u"endswiths": [u"hello"], u"contains": [u"hallow"]}
     self.assertEqual(expected, actual)