コード例 #1
0
 async def test_should_normalize_quoted_url(self):
     url = ("https%3A//www.google.ca/images/branding/googlelogo/2x/"
            "googlelogo_color_272x92dp.png")
     expected = ("https://www.google.ca/images/branding/googlelogo/2x/"
                 "googlelogo_color_272x92dp.png")
     result = loader._normalize_url(url)
     expect(result).to_equal(expected)
コード例 #2
0
ファイル: https_loader_vows.py プロジェクト: xialisun/thumbor
 def topic(self):
     return loader._normalize_url('some.url')
コード例 #3
0
 def test_should_normalize_url(self):
     expect(loader._normalize_url('http://some.url')).to_equal(
         'http://some.url')
     expect(loader._normalize_url('some.url')).to_equal('https://some.url')
コード例 #4
0
 async def test_should_normalize_url(self):
     expect(loader._normalize_url("http://some.url")).to_equal(
         "http://some.url")
     expect(loader._normalize_url("some.url")).to_equal("https://some.url")
コード例 #5
0
ファイル: test_https_loader.py プロジェクト: Bladrak/thumbor
 def test_should_normalize_quoted_url(self):
     url = 'https%3A//www.google.ca/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'
     expected = 'https://www.google.ca/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'
     result = loader._normalize_url(url)
     expect(result).to_equal(expected)
コード例 #6
0
ファイル: test_https_loader.py プロジェクト: Bladrak/thumbor
 def test_should_normalize_url(self):
     expect(loader._normalize_url('http://some.url')).to_equal('http://some.url')
     expect(loader._normalize_url('some.url')).to_equal('https://some.url')
コード例 #7
0
 def test_should_normalize_url_but_keep_quotes_after_the_domain(self):
     for url in ['https://some.url/my image', 'some.url/my%20image']:
         expect(loader._normalize_url(url)).to_equal('https://some.url/my%20image')
コード例 #8
0
ファイル: https_loader_vows.py プロジェクト: mstorus/thumbor
 def topic(self):
     return loader._normalize_url('some.url')
コード例 #9
0
def _normalize_url(url):
    return https_loader._normalize_url(url)