A recent update to lxml for Python >= 3.6 now preserves key order. Change the test input so the input is sorted, making tests pass on previous versions of lxml as well as the latest version.