assertTableColumns method in tests/test_sql_upgrade.py is used to asserts that the table contains the expected set of columns. But, it always passes because the return of sort method is None:
https://github.com/openstack/keystone/blob/master/keystone/tests/test_sql_upgrade.py#L265
def assertTableColumns(self, table_name, expected_cols):
"""Asserts that the table contains the expected set of columns."""
self.initialize_sql()
table = self.select_table(table_name)
actual_cols = [col.name for col in table.columns]
# Check if the columns are equal, but allow for a different order,
# which might occur after an upgrade followed by a downgrade
self.assertEqual(expected_cols.sort(), actual_cols.sort(),
'%s table' % table_name)
Fix proposed to branch: master /review. openstack. org/155215
Review: https:/