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)
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)
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)
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)
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)
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)
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)
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)
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)