torchbox / wagtail-wordpress-import

A package for Wagtail CMS to import WordPress blog content from an XML file into Wagtail
MIT License
44 stars 16 forks source link

fix/#80-yoast-import-error #72

Closed nickmoreton closed 3 years ago

nickmoreton commented 3 years ago

An eror was occuring where the xml_item_key was returned as a list. This happens if there is only one wp:meta_key and wp:meta_value

nimasmi commented 3 years ago

I'm not completely sure what error was being reported here. Since this is a bugfix, is it possible to add a testcase that fails without the fix, and is fixed by these changes?

NB it looks like https://github.com/torchbox/wagtail-wordpress-import/blob/integration/sprint-6/wagtail_wordpress_import/test/tests/test_wordpress_importer.py#L254 could be a good place for this.

nimasmi commented 3 years ago

Okay, great. Is there a failing CI test run somewhere that demonstrates that the tests reproduce the bug in question?

nickmoreton commented 3 years ago

Okay, great. Is there a failing CI test run somewhere that demonstrates that the tests reproduce the bug in question?

https://github.com/torchbox/wagtail-wordpress-import/pull/72/commits/1f18f5f3a0c44f897a9246cf24d85d70cda67098 was the test to identify the issue but is now replaced with tests expected to pass.

Question: Is there a way to test that no exception occurs?