mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-10-08 22:28:14 +00:00
Some more stabilization of unittests
This commit is contained in:
parent
71d9c6d0f4
commit
d60e95ede7
20 changed files with 122 additions and 33 deletions
|
|
@ -18,6 +18,21 @@ bootstrap()
|
|||
|
||||
import lib.techniques.nosql.inject as ni
|
||||
|
||||
# several setUps here write these conf keys without restoring them; snapshot/restore at the module
|
||||
# boundary so they can't leak into later test modules (order-dependent flakiness)
|
||||
_NOSQL_CONF_KEYS = ("parameters", "paramDict", "timeSec", "cookieDel")
|
||||
_saved_conf = {}
|
||||
|
||||
def setUpModule():
|
||||
from lib.core.data import conf
|
||||
for k in _NOSQL_CONF_KEYS:
|
||||
_saved_conf[k] = conf.get(k)
|
||||
|
||||
def tearDownModule():
|
||||
from lib.core.data import conf
|
||||
for k, v in _saved_conf.items():
|
||||
conf[k] = v
|
||||
|
||||
SECRET = "S3cr3t_9"
|
||||
MATCH = "<html><body>Welcome user; rows: alpha, bravo, charlie</body></html>"
|
||||
NOMATCH = "<html><body>Invalid credentials; no rows</body></html>"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue