mirror of
https://github.com/rapid7/metasploit-payloads
synced 2024-11-20 14:39:22 +01:00
703 B
703 B
Python Meterpreter
Running unit tests:
# Only required if less than python 3.3
python -m pip install mock
# Run the tests
python -m unittest discover -v ./tests
Running a single test failure:
python3 ./tests/test_file.py class_name
python3 ./tests/test_file.py class_name.method_name
# For example
python3 ./tests/test_ext_server_stdapi.py TestExtServerStdApi.test_stdapi_net_config_get_interfaces_via_osx_ifconfig
# Or:
python3 -m unittest tests.test_ext_server_stdapi.ExtServerStdApiFileSystemTest.test_stdapi_fs_stat
To debug tests, add the following code snippet to enter into an interactive debugger at the calling stack frame:
import pdb; pdb.set_trace()