def test_unicode_url(self): url = 'https://cfpb.gov/protecci\xf3n' _, signature = sign_url(url) data = {'ext_url': url, 'signature': signature} with override_settings(EXTERNAL_URL_WHITELIST=(url, )): form = ExternalURLForm(data) self.assertTrue(form.is_valid())
def test_unicode_url(self): url = 'https://cfpb.gov/protecci\xf3n' _, signature = sign_url(url) data = {'ext_url': url, 'signature': signature} with override_settings(EXTERNAL_URL_WHITELIST=(url,)): form = ExternalURLForm(data) self.assertTrue(form.is_valid())
def test_valid_signature(self): url = 'https://https.cio.gov/' _, signature = sign_url(url) data = {'ext_url': url, 'signature': signature} form = ExternalURLForm(data) self.assertTrue(form.is_valid())
def test_valid_signature(self): url = 'https://https.cio.gov/' _, signature = sign_url(url) data = {'ext_url': url, 'signature': signature} form = ExternalURLForm(data) self.assertTrue(form.is_valid())