def test_create_pv_parameters_format():
    given = [{
        'access restricted': 'public',
        'economic scenario': '',
        'end date': '',
        'filepath': '',
        'id': '',
        'parent': '',
        'location': '',
        'start date': '',
        'type': 'transforming activity',
        'technology level': 'undefined',
        'name': 'test case',
        'dataset author': "Fred",
        'data entry': "Wilma",
        'ISIC classification': "420",
        'exchanges': [{
            'amount': 42.,
            'id': '',
            'name': '',
            'tag': 'intermediateExchange',
            'type': 'from technosphere',
            'unit': 'kg',
            'production volume': {
                'variable': 'foo',
                'amount': 1.,
                'formula': 'bar ** 2'
            }
        }],
        'parameters': []
    }]
    assert dataset_schema(create_pv_parameters(given)[0])
Exemple #2
0
def test_create_pv_parameters_format():
    given = [{
        'access restricted':
        'public',
        'economic scenario':
        '',
        'end date':
        '',
        'filepath':
        '',
        'id':
        '',
        'parent':
        '',
        'location':
        '',
        'start date':
        '',
        'type':
        'transforming activity',
        'technology level':
        'undefined',
        'name':
        'test case',
        'dataset author':
        "Fred",
        'data entry':
        "Wilma",
        'ISIC classification':
        "420",
        'exchanges': [{
            'amount': 42.,
            'id': '',
            'name': '',
            'tag': 'intermediateExchange',
            'type': 'from technosphere',
            'unit': 'kg',
            'production volume': {
                'variable': 'foo',
                'amount': 1.,
                'formula': 'bar ** 2'
            }
        }],
        'parameters': []
    }]
    assert dataset_schema(create_pv_parameters(given)[0])
Exemple #3
0
def test_load_validate_paper_dataset(paper):
    assert dataset_schema(paper)
Exemple #4
0
def test_allocation_function_output_valid(cogen):
    for new_ds in economic_allocation(cogen):
        assert dataset_schema(new_ds)
Exemple #5
0
def test_load_validate_cogeneration_dataset(cogen):
    assert dataset_schema(cogen)
Exemple #6
0
def test_allocation_function_output_valid(aluminium):
    for new_ds in recycling_allocation(aluminium):
        assert dataset_schema(new_ds)
Exemple #7
0
def test_load_validate_aluminium_dataset(aluminium):
    assert dataset_schema(aluminium)
Exemple #8
0
def test_basic_validation():
    assert dataset_schema(BASIC_REFERENCE[0])
Exemple #9
0
def test_production_volume_validation():
    assert dataset_schema(PROD_VOLUME_REFERENCE[0])
Exemple #10
0
def test_load_validate_cardboard_dataset(cardboard):
    assert dataset_schema(cardboard)
def test_allocation_function_output_valid(paper):
    for new_ds in waste_treatment_allocation(paper):
        assert dataset_schema(new_ds)
def test_load_validate_paper_dataset(paper):
    assert dataset_schema(paper)
Exemple #13
0
def test_load_validate_cardboard_dataset(cardboard):
    assert dataset_schema(cardboard)
Exemple #14
0
def test_multioutput_validation():
    assert dataset_schema(MULTIOUTPUT_REFERENCE[0])
Exemple #15
0
def test_production_volume_validation():
    assert dataset_schema(PROD_VOLUME_REFERENCE[0])
Exemple #16
0
def test_allocation_function_output_valid(paper):
    for new_ds in waste_treatment_allocation(paper):
        assert dataset_schema(new_ds)
Exemple #17
0
def test_basic_validation():
    assert dataset_schema(BASIC_REFERENCE[0])
Exemple #18
0
def test_load_validate_cogeneration_dataset(cogen):
    assert dataset_schema(cogen)
Exemple #19
0
def test_multioutput_validation():
    assert dataset_schema(MULTIOUTPUT_REFERENCE[0])
Exemple #20
0
def test_allocation_function_output_valid(cogen):
    for new_ds in economic_allocation(cogen):
        assert dataset_schema(new_ds)