def test_shell_active(monkeypatch): mock(monkeypatch) set_up() Create.run(mock_options_create) Shell.run(mock_options_1) settings.update({ 'path': 'append_test' }).save() Create.run(mock_options_create) settings.update({ 'path': 'iprofiles' }).save() Activate.run(mock_options_2) Shell.run(mock_options_1) tear_down()
def test_active(): set_up() Create.run(mock_options) settings.update({ 'path': 'append_test' }).save() Create.run(mock_options) settings.update({ 'path': 'iprofiles' }).save() Activate.run(mock_options) Active.run({}) Activate.run(mock_options_2) Active.run({}) tear_down()
def test_invalid_profile(): set_up() Activate.run(mock_options) assert settings.get('active') is None tear_down()
def test_activate(): set_up() Create.run(mock_options) Activate.run(mock_options) assert settings.get('active') == 'test' tear_down()