@pytest.mark.parametrize('test_format', [mock_result for mock_result in MOCK_QUERY_RESULTS])
def test_formats_count_elements(app_instance, mocker, test_format):
    'Test that structure of versions data matches expectations.'
    mock_query = mocker.patch('AIPscan.Data.report_data._formats_count_query')
    mock_query.return_value = [test_format]
    mock_get_ss_name = mocker.patch('AIPscan.Data._get_storage_service')
    mock_get_ss_name.return_value = MOCK_STORAGE_SERVICE
    report = report_data.formats_count(MOCK_STORAGE_SERVICE_ID, datetime.min, datetime.max)
    report_format = report[fields.FIELD_FORMATS][0]
    assert (test_format.file_format == report_format.get(fields.FIELD_FORMAT))
    assert (test_format.file_count == report_format.get(fields.FIELD_COUNT))
    assert (test_format.total_size == report_format.get(fields.FIELD_SIZE))
Test that structure of versions data matches expectations.
@pytest.mark.parametrize('test_format', [mock_result for mock_result in MOCK_QUERY_RESULTS])
def test_formats_count_elements(app_instance, mocker, test_format):
    
    mock_query = mocker.patch('AIPscan.Data.report_data._formats_count_query')
    mock_query.return_value = [test_format]
    mock_get_ss_name = mocker.patch('AIPscan.Data._get_storage_service')
    mock_get_ss_name.return_value = MOCK_STORAGE_SERVICE
    report = report_data.formats_count(MOCK_STORAGE_SERVICE_ID, datetime.min, datetime.max)
    report_format = report[fields.FIELD_FORMATS][0]
    assert (test_format.file_format == report_format.get(fields.FIELD_FORMAT))
    assert (test_format.file_count == report_format.get(fields.FIELD_COUNT))
    assert (test_format.total_size == report_format.get(fields.FIELD_SIZE))