scrapinghub / spidermon

Scrapy Extension for monitoring spiders execution.
https://spidermon.readthedocs.io
BSD 3-Clause "New" or "Revised" License
528 stars 96 forks source link

Tests failing following schematics update to 2.1.1 #308

Closed further-reading closed 2 years ago

further-reading commented 3 years ago

In the recent build of schematics some messaging was changed which has resulted in test_validators_schematics.py::test_choices failing. Following the update to 2.1.1 the VALUE_NOT_IN_CHOICES error from validation/messages.py will include the missing option and the contents of the list it was checking in, resulting in the following assertion error:

{'a': ['Value not in choices'], 'b': ['Value not in choices']} != {'a': ["Value (c) must be one of ['a', 'b']."], 'b': ['Value (4) must be one of [1, 2, 3].']}

The fix will require either setting schematics to 2.1.0 in requirements or updating the messaging to match the new format.