Exemple #1
0
    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())
Exemple #2
0
    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())
Exemple #3
0
    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())
Exemple #4
0
    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())