~izidor/gtg/documentation

« back to all changes in this revision

Viewing changes to tests/tools/test_urlregex.py

  • Committer: Izidor Matušov
  • Date: 2014-03-09 15:11:59 UTC
  • Revision ID: izidor.matusov@gmail.com-20140309151159-t5ldo0a990em5989
Clean docstrings

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# this program.  If not, see <http://www.gnu.org/licenses/>.
18
18
# -----------------------------------------------------------------------------
19
19
 
20
 
""" Tests for URL regex """
 
20
from unittest import TestCase
21
21
 
22
 
import unittest
23
22
from GTG.tools.urlregex import match
24
23
 
25
24
 
26
 
class TestURLRegex(unittest.TestCase):
27
 
    """ Test extractor of URL from text """
 
25
class TestURLRegex(TestCase):
 
26
    """ URL Regex """
28
27
 
29
 
    def test_anchor_amperstand(self):
30
 
        """ Reproducer for bug #1023555 """
 
28
    def test_allows_ampersand_in_anchor(self):
 
29
        # Reproducer for https://bugs.launchpad.net/gtg/+bug/1023555
31
30
        url = "http://test.com/#hi&there"
32
 
        self.assertEqual(match(url).group(0), url)
 
31
        matched_url = match(url).group(0)
 
32
        self.assertEqual(url, matched_url)