Exemplo n.º 1
0
def test_get_deploy_info_does_not_exist(mock_stdout, mock_read_deploy, mock_join):
    mock_read_deploy.return_value = False
    expected_output = '%s\n' % PaastaCheckMessages.DEPLOY_YAML_MISSING
    with raises(SystemExit) as sys_exit:
        status.get_deploy_info('fake_service')
    output = mock_stdout.getvalue()
    assert sys_exit.value.code == 1
    assert output == expected_output
Exemplo n.º 2
0
def test_get_deploy_info_does_not_exist(mock_stdout, mock_read_deploy, mock_join):
    mock_read_deploy.return_value = False
    expected_output = '%s\n' % PaastaCheckMessages.DEPLOY_YAML_MISSING
    with raises(SystemExit) as sys_exit:
        status.get_deploy_info('fake_service')
    output = mock_stdout.getvalue()
    assert sys_exit.value.code == 1
    assert output == expected_output
Exemplo n.º 3
0
def test_get_deploy_info_exists(mock_read_deploy, mock_join):
    expected = 'fake deploy yaml'
    mock_read_deploy.return_value = expected
    actual = status.get_deploy_info('fake_service')
    assert expected == actual
Exemplo n.º 4
0
def test_get_deploy_info_exists(mock_read_deploy, mock_join):
    expected = 'fake deploy yaml'
    mock_read_deploy.return_value = expected
    actual = status.get_deploy_info('fake_service')
    assert expected == actual