Пример #1
0
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
Пример #2
0
def test_ref_to_obj():
    modules_store = ModulesStore(Attack)
    modules_store.add(module_attack)
    obj = modules_store._ref_to_obj("chaosmonkey.attacks.attack:Attack")
    assert obj is Attack