Skip to content

Commit

Permalink
Add Sentier tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel committed Aug 15, 2024
1 parent 146203f commit 60a3b3d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tests/sentier.dev/test_simapro_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,38 @@ def test_integration_SPUC():
]
for obj in expected:
assert obj in result


def test_match_internal_simapro_simapro_with_unit_conversion():
given = [
{
"name": "foo",
"location": "bar",
"database": "a",
"code": "b",
"unit": "km",
"exchanges": [
{"name": "foo", "location": "bar", "unit": "m", "amount": 1000.0}
],
}
]
expected = [
{
"name": "foo",
"location": "bar",
"database": "a",
"code": "b",
"unit": "km",
"exchanges": [
{
"input": ("a", "b"),
"name": "foo",
"location": "bar",
"unit": "km",
"loc": 1.0,
"amount": 1.0,
}
],
}
]
assert match_internal_simapro_simapro_with_unit_conversion(given) == expected

0 comments on commit 60a3b3d

Please sign in to comment.