示例#1
0
def test_invalid_profile():
    set_up()
    settings.update({
        'active': 'test'
    }).save()
    Active.run({})
    tear_down()
示例#2
0
def test_shell_profile_none(monkeypatch):
    mock(monkeypatch)
    set_up()
    settings.update({
        'append': {
            'test': None
        }
    }).save()
    Shell.run(mock_options_2)
    tear_down()
示例#3
0
def test_icommand_list_profiles():
    set_up()
    settings.update({
        'path': 'append_test'
    }).save()
    Create.run(mock_options)
    settings.update({
        'path': 'iprofiles'
    }).save()
    cmd = ICommand(_autorun=False)
    cmd.settings = settings
    cmd.list_profiles('iprofiles')
    tear_down()
示例#4
0
def test_shell(monkeypatch):
    mock(monkeypatch)
    set_up()
    settings.update({
        'path': 'append_test'
    }).save()
    Create.run(mock_options)
    settings.update({
        'path': 'iprofiles'
    }).save()
    Shell.run(mock_options)
    Shell.run(mock_options_2)
    tear_down()
示例#5
0
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()
示例#6
0
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()
示例#7
0
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()