Some of the unit tests are failing when a wagtail version of >=2.12 is installed. The failing tests are test_custom_page_streamfield_data_complex, test_custom_page_streamfield_default_blocks, test_custom_page_streamfield and test_custom_page_streamfield_data. I've tried running the tests against Wagtail 2.9.3 and 2.11.7 and they pass. The issue seems to be that an id attribute has been added to the block in Wagtail >= 2.12. For example the data returned by the MyTestPageWithStreaFieldFactory call, with Wagtail >= 2.12 looks like this (page.body.streamdata):
[('char_array', ['foo', 'bar'], '35741861-c5ea-45a9-a8f5-8f5de95fe6d8'), ('struct', StructValue([('title', 'My Title'), ('item', StructValue([('label', 'my-label'), ('value', 100)])), ('items', ), ('image', None)]), 'a99daf3d-9055-45f3-a0f2-3b61fd45f58a'), ('int_array', , 'b7b60e57-5df2-4996-9916-d8f132ba57be'), ('image', <Image: Blub>, '4138701b-c8fe-45b9-91f9-6e0cdbcce520')]
Note the additional guids which are not expected in the test data.
I will try to fix this issue, but I'm looking for some advise on the best way to proceed. Can we simply drop support for older versions of wagtail and modify the unit tests to expect the additional guids? Or do we need to maintain support for older versions of Wagtail and modify the tests to take account of different versions (EG check the Wagtail version)? Or some other option which I have not thought of?
Grey Wagtails won't eat peanuts or sunflower seeds from garden bird feeders since they are not a part of their natural diet, however they may eat dried mealworms scattered across the lawn or from a ground bird feeder.
|Last Update||4 months ago|