Exemple #1
0
    def test_get_desc_template_special_chars_unicode(self):
        i1 = MockInfo()
        i1.set_url(URL('http://w3af.org/1'))

        i2 = MockInfo()
        i2.set_url(URL('http://w3af.org/2\xc3\xb6'))

        tiset = TemplatedInfoSetPrintUri([i1, i2])
        expected = u' - http://w3af.org/1\n - http://w3af.org/2ö\n'
        self.assertEqual(tiset.get_desc(), expected)
Exemple #2
0
    def test_get_desc_template_special_chars_unicode(self):
        i1 = MockInfo()
        i1.set_url(URL('http://w3af.org/1'))

        i2 = MockInfo()
        i2.set_url(URL('http://w3af.org/2\xc3\xb6'))

        tiset = TemplatedInfoSetPrintUri([i1, i2])
        expected = u' - http://w3af.org/1\n - http://w3af.org/2ö\n'
        self.assertEqual(tiset.get_desc(), expected)
Exemple #3
0
    def test_get_desc_urls(self):
        i1 = MockInfo()
        i1.set_url(URL('http://w3af.org/1'))

        i2 = MockInfo()
        i2.set_url(URL('http://w3af.org/2'))

        tiset = TemplatedInfoSetPrintUri([i1, i2])
        expected = u' - http://w3af.org/2\n - http://w3af.org/1\n'
        self.assertEqual(tiset.get_desc(), expected)
Exemple #4
0
    def test_get_desc_urls(self):
        i1 = MockInfo()
        i1.set_url(URL('http://w3af.org/1'))

        i2 = MockInfo()
        i2.set_url(URL('http://w3af.org/2'))

        tiset = TemplatedInfoSetPrintUri([i1, i2])
        expected = u' - http://w3af.org/2\n - http://w3af.org/1\n'
        self.assertEqual(tiset.get_desc(), expected)