コード例 #1
0
    def test_get_path_qs(self):
        u = URL(u"https://w3af.com:443/xyz/123/456/789/")
        self.assertEqual(u.get_path(), u"/xyz/123/456/789/")

        u = URL(u"https://w3af.com:443/xyz/123/456/789/")
        self.assertEqual(u.get_path_qs(), u"/xyz/123/456/789/")

        u = URL(u"https://w3af.com:443/xyz/file.asp")
        self.assertEqual(u.get_path_qs(), u"/xyz/file.asp")

        u = URL(u"https://w3af.com:443/xyz/file.asp?id=1")
        self.assertEqual(u.get_path_qs(), u"/xyz/file.asp?id=1")
コード例 #2
0
ファイル: test_url.py プロジェクト: johnjohnsp1/w3af
    def test_get_path_qs(self):
        u = URL(u'https://w3af.com:443/xyz/123/456/789/')
        self.assertEqual(u.get_path(), u'/xyz/123/456/789/')

        u = URL(u'https://w3af.com:443/xyz/123/456/789/')
        self.assertEqual(u.get_path_qs(), u'/xyz/123/456/789/')

        u = URL(u'https://w3af.com:443/xyz/file.asp')
        self.assertEqual(u.get_path_qs(), u'/xyz/file.asp')

        u = URL(u'https://w3af.com:443/xyz/file.asp?id=1')
        self.assertEqual(u.get_path_qs(), u'/xyz/file.asp?id=1')
コード例 #3
0
ファイル: test_url.py プロジェクト: 3rdDegree/w3af
 def test_get_path_qs(self):
     u = URL(u'https://w3af.com:443/xyz/123/456/789/')
     self.assertEqual(u.get_path(), u'/xyz/123/456/789/')
     
     u = URL(u'https://w3af.com:443/xyz/123/456/789/')
     self.assertEqual(u.get_path_qs(), u'/xyz/123/456/789/')
     
     u = URL(u'https://w3af.com:443/xyz/file.asp')
     self.assertEqual(u.get_path_qs(), u'/xyz/file.asp')
     
     u = URL(u'https://w3af.com:443/xyz/file.asp?id=1')
     self.assertEqual(u.get_path_qs(), u'/xyz/file.asp?id=1')
コード例 #4
0
    def test_set_params(self):
        u = URL("http://w3af.com/;id=1")
        u.set_param("file=2")

        self.assertEqual(u.get_params_string(), "file=2")

        u = URL("http://w3af.com/xyz.txt;id=1?file=2")
        u.set_param("file=3")

        self.assertEqual(u.get_params_string(), "file=3")
        self.assertEqual(u.get_path_qs(), "/xyz.txt;file=3?file=2")
コード例 #5
0
ファイル: test_url.py プロジェクト: johnjohnsp1/w3af
    def test_set_params(self):
        u = URL('http://w3af.com/;id=1')
        u.set_param('file=2')

        self.assertEqual(u.get_params_string(), 'file=2')

        u = URL('http://w3af.com/xyz.txt;id=1?file=2')
        u.set_param('file=3')

        self.assertEqual(u.get_params_string(), 'file=3')
        self.assertEqual(u.get_path_qs(), '/xyz.txt;file=3?file=2')
コード例 #6
0
ファイル: test_url.py プロジェクト: 3rdDegree/w3af
 def test_set_params(self):
     u = URL('http://w3af.com/;id=1')
     u.set_param('file=2')
     
     self.assertEqual(u.get_params_string(), 'file=2')
     
     u = URL('http://w3af.com/xyz.txt;id=1?file=2')
     u.set_param('file=3')
     
     self.assertEqual(u.get_params_string(), 'file=3')
     self.assertEqual(u.get_path_qs(), '/xyz.txt;file=3?file=2')