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])
def test_load_validate_paper_dataset(paper): assert dataset_schema(paper)
def test_allocation_function_output_valid(cogen): for new_ds in economic_allocation(cogen): assert dataset_schema(new_ds)
def test_load_validate_cogeneration_dataset(cogen): assert dataset_schema(cogen)
def test_allocation_function_output_valid(aluminium): for new_ds in recycling_allocation(aluminium): assert dataset_schema(new_ds)
def test_load_validate_aluminium_dataset(aluminium): assert dataset_schema(aluminium)
def test_basic_validation(): assert dataset_schema(BASIC_REFERENCE[0])
def test_production_volume_validation(): assert dataset_schema(PROD_VOLUME_REFERENCE[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_multioutput_validation(): assert dataset_schema(MULTIOUTPUT_REFERENCE[0])