Beispiel #1
0
def test_get_file_header_none_with_presigned_url():
    """Tests whether default file handle created by get_file_header is as expected."""
    file_header = SnowflakeGCSUtil.get_file_header(
        {"presigned_url": "www.example.com"}, 'file')
    assert file_header.digest is None
    assert file_header.content_length is None
    assert file_header.encryption_metadata is None
Beispiel #2
0
def test_get_file_header_none_with_presigned_url(tmp_path):
    """Tests whether default file handle created by get_file_header is as expected."""
    meta = SnowflakeFileMeta(
        name=str(tmp_path / 'some_file'),
        src_file_name=str(tmp_path / 'some_file'),
        stage_location_type='GCS',
        presigned_url='www.example.com',
    )
    file_header = SnowflakeGCSUtil.get_file_header(meta, 'file')
    assert file_header.digest is None
    assert file_header.content_length is None
    assert file_header.encryption_metadata is None
Beispiel #3
0
def test_get_file_header_none():
    """Tests whether default file handle created by get_file_header is as expected."""
    file_header = SnowflakeGCSUtil.get_file_header({}, 'file')
    assert file_header.digest is None
    assert file_header.content_length is None
    assert file_header.encryption_metadata is None