diff --git a/tests/csv/csv_lcia.py b/tests/csv/csv_lcia.py index cf9af4f..cca768d 100644 --- a/tests/csv/csv_lcia.py +++ b/tests/csv/csv_lcia.py @@ -1,6 +1,6 @@ import os -from bw2data import Database, Method, config, methods +from bw2data import Database, Method, config, methods, get_node from bw2data.tests import bw2test from bw2io import CSVLCIAImporter @@ -79,5 +79,5 @@ def test_csv_lcia_integration(): } assert methods[("foo",)] == expected - expected = [(("biosphere", "a"), 42), (("biosphere", "b"), 1000000)] + expected = [(get_node(code="a").id, 42), (get_node(code="b").id, 1000000)] assert Method(("foo",)).load() == expected diff --git a/tests/excel/lcia.py b/tests/excel/lcia.py index d9f23bc..38c8b71 100644 --- a/tests/excel/lcia.py +++ b/tests/excel/lcia.py @@ -1,6 +1,6 @@ import os -from bw2data import Database, Method, config, methods +from bw2data import Database, Method, config, methods, get_node from bw2data.tests import bw2test from bw2io import ExcelLCIAImporter @@ -81,5 +81,5 @@ def test_excel_lcia_integration(): } assert methods[("foo",)] == expected - expected = [(("biosphere", "a"), 42), (("biosphere", "b"), 1000000)] + expected = [(get_node(code="a").id, 42), (get_node(code="b").id, 1000000)] assert Method(("foo",)).load() == expected diff --git a/tests/export/csv_excel_exporters.py b/tests/export/csv_excel_exporters.py index c89d10b..77d5970 100644 --- a/tests/export/csv_excel_exporters.py +++ b/tests/export/csv_excel_exporters.py @@ -124,6 +124,7 @@ def test_write_lci_excel_rich_data_skipped(): [None, None], ["Activity", "bar"], ["code", "a"], + ['type', 'processwithreferenceproduct'], ["Exchanges", None], ] assert given == expected diff --git a/tests/sentier.dev/test_simapro_units.py b/tests/sentier.dev/test_simapro_units.py index db33136..3b54545 100644 --- a/tests/sentier.dev/test_simapro_units.py +++ b/tests/sentier.dev/test_simapro_units.py @@ -11,38 +11,39 @@ def test_integration_SPUC(): result = spuc.get_simapro_conversions("MJ") expected = [ { - "qk": "https://vocab.sentier.dev/qudt/quantity-kind/Energy", + "qk": "https://vocab.sentier.dev/units/quantity-kind/Energy", "factor": 0.001, "unit": "GJ", }, { - "qk": "https://vocab.sentier.dev/qudt/quantity-kind/Energy", + "qk": "https://vocab.sentier.dev/units/quantity-kind/Energy", "factor": 1000.0, "unit": "kJ", }, { - "qk": "https://vocab.sentier.dev/qudt/quantity-kind/Energy", + "qk": "https://vocab.sentier.dev/units/quantity-kind/Energy", "factor": 0.2777777777777778, "unit": "kWh", }, { - "qk": "https://vocab.sentier.dev/qudt/quantity-kind/Energy", + "qk": "https://vocab.sentier.dev/units/quantity-kind/Energy", "factor": 0.0002777777777777778, "unit": "MWh", }, { - "qk": "https://vocab.sentier.dev/qudt/quantity-kind/Energy", + "qk": "https://vocab.sentier.dev/units/quantity-kind/Energy", "factor": 277.77777777777777, "unit": "Wh", }, ] + print(result) for obj in expected: assert obj in result result = spuc.get_simapro_conversions("km") expected = [ { - "qk": "https://vocab.sentier.dev/qudt/quantity-kind/Length", + "qk": "https://vocab.sentier.dev/units/quantity-kind/Length", "factor": 1000.0, "unit": "m", }