Example #1
0
 def get_wiki_list_of_episodes_page(self):
     opener = urllib2.build_opener()
     opener.addheaders = [('User-agent', 'Mozilla/5.0')]
     url = "http://en.wikipedia.org/wiki/List_of_%s_episodes" % (string_utils.camelcase(self.name, exceptions=['of', 'a', 'and']).replace(' ', '_'))
     print 'getting: ' + url
     infile = opener.open(url)
     page = infile.read()
     return page
Example #2
0
 def test_camelcase_with_exceptions_first_word_is_still_capitalized(self):
     self.assertEqual('A Game of a Thrones', string_utils.camelcase('a game of a thrones', exceptions=['a', 'of']))
Example #3
0
 def test_camelcase_with_exceptions(self):
     self.assertEqual('A Game of Thrones', string_utils.camelcase('a game of thrones', exceptions=['of']))
Example #4
0
 def test_camelcase(self):
     self.assertEqual('A Game Of Thrones', string_utils.camelcase('a game of thrones'))