Beispiel #1
0
def test_create_bucket_raises(mock_client):

    mock_client.create_bucket.side_effect = Conflict('error')

    gs = GCS(bucket='foo', gc_credentials_file='foo/bar')
    with pytest.raises(GCSDestinationError):
        gs.create_bucket()
Beispiel #2
0
def test_create_bucket_raises(mock_client):

    mock_client.create_bucket.side_effect = Conflict('error')

    gs = GCS(
        bucket='foo',
        gc_credentials_file='foo/bar'
    )
    with pytest.raises(GCSDestinationError):
        gs.create_bucket()
Beispiel #3
0
def test_create_bucket(mock_client):

    gs = GCS(
        bucket='foo',
        gc_credentials_file='foo/bar'
    )
    gs.create_bucket()
    mock_client.create_bucket.assert_called_once_with(
        bucket_name='foo'
    )
Beispiel #4
0
def test_create_bucket(mock_client):

    gs = GCS(bucket='foo', gc_credentials_file='foo/bar')
    gs.create_bucket()
    mock_client.create_bucket.assert_called_once_with(bucket_name='foo')