fix syntax in test for old Py3 versions