def test_delete_active(): set_up() Create.run(mock_options_4) assert settings.get('active') == 'test' Delete.run(mock_options_2) assert settings.get('active') is None tear_down()
def test_delete(): set_up() Create.run(mock_options) settings.update({ 'path': 'append_test' }).save() Create.run(mock_options) settings.update({ 'path': 'iprofiles' }).save() Delete.run(mock_options) assert not os.path.isdir(os.path.join(settings.get('path'), 'test')) tear_down()
def test_delete_confirm_false(monkeypatch): mock(monkeypatch) set_up() Create.run(mock_options) Delete.run(mock_options_3) tear_down()
def test_invalid_profile(): set_up() Delete.run(mock_options) tear_down()
def test_delete_none(): set_up() Delete.run(mock_options_2) tear_down()
def test_delete_none_confirm_false(monkeypatch): mock(monkeypatch) set_up() Delete.run({}) tear_down()