Skip to content

Commit

Permalink
add more get vars tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xmendez committed Oct 15, 2019
1 parent b1bad00 commit 99ad783
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_reqresp.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,5 +253,25 @@ def test_cache_key_json_header_after(self):

self.assertEqual(fr.to_cache_key(), 'http://www.wfuzz.org/-p1')

def test_cache_key_get_var(self):
fr = FuzzRequest()
fr.url = "http://www.wfuzz.org/?a&b=1"

self.assertEqual(fr.to_cache_key(), 'http://www.wfuzz.org/-ga-gb')

def test_get_vars(self):
fr = FuzzRequest()
fr.url = "http://www.wfuzz.org/?a&b=1"
self.assertEqual(fr.params.get, {'a': None, 'b': '1'})

fr = FuzzRequest()
fr.url = "http://www.wfuzz.org/?"
self.assertEqual(fr.params.get, {})

fr = FuzzRequest()
fr.url = "http://www.wfuzz.org/"
self.assertEqual(fr.params.get, {})


if __name__ == '__main__':
unittest.main()

0 comments on commit 99ad783

Please sign in to comment.