예제 #1
0
    def test_urlparse(self):
        """Test urlparser for chrome and about URLs."""

        # about:*
        url = 'about:config'
        p = utils.urlparse(url)
        eq_(p.scheme, 'about')
        eq_(p.netloc, 'config')
        eq_(p.geturl(), url)

        # chrome
        url = 'chrome://somewhere/special'
        p = utils.urlparse(url)
        eq_(p.scheme, 'chrome')
        eq_(p.netloc, 'somewhere')
        eq_(p.path, 'special')
        eq_(p.geturl(), url)

        # HTTP (unchanged from Python)
        url = 'http://example.com/something'
        p = utils.urlparse(url)
        eq_(p, urlparse_.urlparse(url))
예제 #2
0
파일: tests.py 프로젝트: tofumatt/reporter
    def test_urlparse(self):
        """Test urlparser for chrome and about URLs."""

        # about:*
        url = 'about:config'
        p = utils.urlparse(url)
        eq_(p.scheme, 'about')
        eq_(p.netloc, 'config')
        eq_(p.geturl(), url)

        # chrome
        url = 'chrome://somewhere/special'
        p = utils.urlparse(url)
        eq_(p.scheme, 'chrome')
        eq_(p.netloc, 'somewhere')
        eq_(p.path, 'special')
        eq_(p.geturl(), url)

        # HTTP (unchanged from Python)
        url = 'http://example.com/something'
        p = utils.urlparse(url)
        eq_(p, urlparse_.urlparse(url))
예제 #3
0
 def parsed_url(self):
     return utils.urlparse(self.url)