guardicore / monkey

Infection Monkey - An open-source adversary emulation platform
https://www.guardicore.com/infectionmonkey/
GNU General Public License v3.0
6.58k stars 767 forks source link

Inconsistent naming of unit test files #925

Closed mssalvatore closed 3 years ago

mssalvatore commented 3 years ago

Issue

The python source code files that contain unit tests have inconsistent names. Some have names like test_*.py (e.g. monkey/common/network/test_network_utils.py) while others have names like *_test.py (e.g. infection_monkey/exploit/tools/payload_parsing_test.py). To further complicate matters, some files, such as monkey_island/cc/resources/test/monkey_test.py, are not unit tests at all.

Solution

Both pytest and unittest use the naming convention test_*.py. Rename all of the files with names like *_test.py that contain unit tests so that they are consistent with pytest and unittest recommendation.

Where applicable, the class names should match the filenames. For example, the file containing class TestBootloader should be named test_bootloader.py

Time Remaing - 0.25d - @shreyamalviya

BrennenC commented 3 years ago

I was wondering if this was being worked? I'd love the chance to contribute to this project in any capacity!

VakarisZ commented 3 years ago

@BrennenC go ahead!