shodan-python
shodan-python copied to clipboard
TST: Migrate Shodan unit testing framework to pytest
I am recommending that the existing unit tests be migrated away from the unittest
library over to pytest
.
Benefits:
- Leverage PyTest fixtures as a cleaner and simpler solution for unit testing setUp / tearDown functionality.
-
pytest.mark.parameterize
provides a much cleaner, simpler, and scalable method to handle multiple test cases when testing a single method. - Easier to scope tests down to a single function, rather than testing at the class level.
- Leverage PyTest fixtures + mock requests to test HTTP requests.