コード例 #1
0
def test_record_deployment(deployment_init, deployment_deploy, secho):
    deployment_init.return_value = None
    result = record_deployment('1.2.3', 'APIKEY', 'APPID', 'Comment', 'user')

    deployment_init.assert_called_once_with('APIKEY', 'APPID', 'user')
    deployment_deploy.assert_called_once_with('1.2.3', '', 'Comment')
    secho.assert_any_call('Recording deployment in New Relic', nl=False)
    secho.assert_any_call('\nDone\n', fg='green')

    assert result is True
コード例 #2
0
ファイル: test_cli.py プロジェクト: fabfuel/ecs-deploy
def test_record_deployment(deployment_init, deployment_deploy, secho):
    deployment_init.return_value = None
    result = record_deployment('1.2.3', 'APIKEY', 'APPID', 'Comment', 'user')

    deployment_init.assert_called_once_with('APIKEY', 'APPID', 'user')
    deployment_deploy.assert_called_once_with('1.2.3', '', 'Comment')
    secho.assert_any_call('Recording deployment in New Relic', nl=False)
    secho.assert_any_call('\nDone\n', fg='green')

    assert result is True
コード例 #3
0
def test_record_deployment_without_appid(Deployment):
    result = record_deployment('1.2.3', 'APIKEY', None, None, None)
    assert result is False
コード例 #4
0
def test_record_deployment_without_apikey(Deployment):
    result = record_deployment('1.2.3', None, None, None, None)
    assert result is False
コード例 #5
0
def test_record_deployment_without_revision(Deployment):
    result = record_deployment(None, None, None, None, None)
    assert result is False
コード例 #6
0
ファイル: test_cli.py プロジェクト: fabfuel/ecs-deploy
def test_record_deployment_without_appid(Deployment):
    result = record_deployment('1.2.3', 'APIKEY', None, None, None)
    assert result is False
コード例 #7
0
ファイル: test_cli.py プロジェクト: fabfuel/ecs-deploy
def test_record_deployment_without_apikey(Deployment):
    result = record_deployment('1.2.3', None, None, None, None)
    assert result is False
コード例 #8
0
ファイル: test_cli.py プロジェクト: fabfuel/ecs-deploy
def test_record_deployment_without_revision(Deployment):
    result = record_deployment(None, None, None, None, None)
    assert result is False