def test_WWW_sub(self): 'Test that WWW is turned into a link' r = wwwMatcher.sub('WWW.Example.Com') self.assertEqual('<a href="http://WWW.Example.Com">WWW.Example.Com</a>', r)
def test_www_sub(self): 'Test that www is turned into a link' r = wwwMatcher.sub('www.example.com') self.assertEqual('<a href="http://www.example.com">www.example.com</a>', r)