コード例 #1
0
ファイル: markup.py プロジェクト: NavyaEV/instagram
 def test_finds_single_href(self):
     self.assertEquals(
         get_anchor_href('<a href="http://example.com">Test</a>'),
         [u'http://example.com']
     )
コード例 #2
0
ファイル: markup.py プロジェクト: NavyaEV/instagram
 def test_finds_hrefs_inside_otherstuff(self):
     self.assertEquals(
         get_anchor_href('Here is a <a href="http://example.com/?blah=1234&something-else=KKdjfkdksa">link</a> to somewhere...'),
         [u'http://example.com/?blah=1234&something-else=KKdjfkdksa']
     )
コード例 #3
0
ファイル: markup.py プロジェクト: NavyaEV/instagram
 def test_finds_two_duplicates(self):
     self.assertEquals(
         get_anchor_href('<a href="http://example.com">Test</a><a href="http://example.com">Test 2</a>'),
         [u'http://example.com', u'http://example.com']
     )
コード例 #4
0
ファイル: markup.py プロジェクト: jeffmaxey/django-toolkit
 def test_finds_single_href(self):
     self.assertEquals(
         get_anchor_href('<a href="http://example.com">Test</a>'),
         [u'http://example.com'])
コード例 #5
0
ファイル: markup.py プロジェクト: jeffmaxey/django-toolkit
 def test_finds_hrefs_inside_otherstuff(self):
     self.assertEquals(
         get_anchor_href(
             'Here is a <a href="http://example.com/?blah=1234&something-else=KKdjfkdksa">link</a> to somewhere...'
         ), [u'http://example.com/?blah=1234&something-else=KKdjfkdksa'])
コード例 #6
0
ファイル: markup.py プロジェクト: jeffmaxey/django-toolkit
 def test_finds_two_duplicates(self):
     self.assertEquals(
         get_anchor_href(
             '<a href="http://example.com">Test</a><a href="http://example.com">Test 2</a>'
         ), [u'http://example.com', u'http://example.com'])