def test_remove(): sys.path.insert(0, "attacks") module = __import__("terminate_ec2_instance") modules_store = ModulesStore(Attack) modules_store.add(module) modules_store.remove("terminate_ec2_instance") assert len(modules_store.list()) == 0
def test_list(modules_mock): sys.path.insert(0, "attacks") module = __import__("terminate_ec2_instance") modules_store = ModulesStore(Attack) modules_mock.return_value = [module] assert len(modules_store.list()) == 1