Skip to content

Commit

Permalink
Add test of json_to_dict utility function
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholmer committed Jan 5, 2025
1 parent 9e2d3b9 commit 58767c6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion taxcalc/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
read_egg_csv, read_egg_json, delete_file,
bootstrap_se_ci,
certainty_equivalent,
ce_aftertax_expanded_income
ce_aftertax_expanded_income,
json_to_dict
)


Expand Down Expand Up @@ -815,3 +816,9 @@ def test_table_columns_labels():
# check that length of two lists are the same
assert len(DIST_TABLE_COLUMNS) == len(DIST_TABLE_LABELS)
assert len(DIFF_TABLE_COLUMNS) == len(DIFF_TABLE_LABELS)


def test_invalid_json_to_dict():
"""Test docstring"""
with pytest.raises(ValueError):
json_to_dict('invalid_json_text')

0 comments on commit 58767c6

Please sign in to comment.