we cant reason about the order of sets when iterated

split out assert into three parts
This commit is contained in:
Leo Hemsted
2019-04-03 15:47:53 +01:00
parent 28bff28786
commit 1c6b291a42

View File

@@ -276,9 +276,10 @@ def test_record_daily_sorted_counts_raises_dvla_exception_with_unknown_sorted_st
filename = "failed.txt"
with pytest.raises(DVLAException) as e:
record_daily_sorted_counts(filename=filename)
unknown_values = set({'invalid', 'mm'})
assert "DVLA response file: {} contains unknown Sorted status {}".format(
filename, unknown_values.__repr__()) == e.value.message
assert "DVLA response file: {} contains unknown Sorted status".format(filename) in e.value.message
assert "'mm'" in e.value.message
assert "'invalid'" in e.value.message
def test_record_daily_sorted_counts_persists_daily_sorted_letter_count_with_no_sorted_values(