예제 #1
0
def test_no_args():
    """Running del with no args"""

    testutils.deploy_config(testutils.get_default_config())

    rtn = testutils.dtf("prop del")

    testutils.undeploy()

    assert (rtn.return_code == 0)
예제 #2
0
파일: test_reset.py 프로젝트: 5l1v3r1/dtf
def test_reset_real():
    """Perform a reset"""

    testutils.deploy_config(testutils.get_default_config())

    rtn = testutils.dtf("reset", input_data="y\n")

    testutils.undeploy()

    assert (rtn.return_code == 0)
예제 #3
0
파일: test_reset.py 프로젝트: 5l1v3r1/dtf
def test_reset_bail():
    """Attempt a reset but decline"""

    testutils.deploy_config(testutils.get_default_config())

    rtn = testutils.dtf("reset", input_data="n\n")

    testutils.undeploy()

    assert (rtn.return_code == 255)
예제 #4
0
def test_set_a_prop():
    """Set an arbitrary property"""

    testutils.deploy_config(testutils.get_default_config())

    rtn = testutils.dtf("prop set Info magic AbraKadabra")

    testutils.undeploy()

    assert (rtn.return_code == 0)
예제 #5
0
파일: test_prop.py 프로젝트: 5l1v3r1/dtf
def test_not_subcommand():

    """Call invalid subcommand"""

    testutils.deploy_config(testutils.get_default_config())

    rtn = testutils.dtf("prop NON_EXIST")

    testutils.undeploy()

    assert(rtn.return_code == 0)
예제 #6
0
def test_test_invalid_prop():

    """Test an invalid property"""

    testutils.deploy_config(testutils.get_default_config())

    rtn = testutils.dtf("prop test Info magic")

    testutils.undeploy()

    assert(rtn.return_code == 0)
예제 #7
0
def test_get_invalid_prop():

    """Get a non-existing property"""

    testutils.deploy_config(testutils.get_default_config())

    rtn = testutils.dtf("prop get Info magic")

    testutils.undeploy()

    assert(rtn.return_code == 255)
예제 #8
0
def test_del_valid_prop():
    """Delete a valid property"""

    config = testutils.get_default_config()
    config.set("Info", "magic", "AbraKadabra")

    testutils.deploy_config(config)

    rtn = testutils.dtf("prop del Info magic")

    testutils.undeploy()

    assert (rtn.return_code == 0)
예제 #9
0
파일: test_local.py 프로젝트: 5l1v3r1/dtf
def test_no_args():
    """Run with not args"""

    testutils.deploy_config(testutils.get_default_config())

    example_local = "%s/example" % utils.LOCAL_MODULES_DIRECTORY
    utils.touch(example_local)

    rtn = testutils.dtf("local")

    testutils.undeploy()

    assert (rtn.return_code == 0)