Unit tests fail with sqlalchemy 1.0+. See https://review.openstack.org/#/c/190405/ , which tries to upgrade the requirement and fails.
2015-06-16 19:32:44.080 | keystone.tests.unit.test_sql_upgrade.SqlUpgradeTests.test_region_url_upgrade
2015-06-16 19:32:44.080 | ----------------------------------------------------------------------------
2015-06-16 19:32:44.080 |
2015-06-16 19:32:44.080 | Captured traceback:
2015-06-16 19:32:44.081 | ~~~~~~~~~~~~~~~~~~~
2015-06-16 19:32:44.081 | Traceback (most recent call last):
2015-06-16 19:32:44.081 | File "keystone/tests/unit/test_sql_upgrade.py", line 196, in tearDown
2015-06-16 19:32:44.081 | conn.execute(schema.DropConstraint(fkc))
2015-06-16 19:32:44.081 | File "/home/jenkins/workspace/gate-keystone-python27/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
2015-06-16 19:32:44.081 | return meth(self, multiparams, params)
2015-06-16 19:32:44.081 | File "/home/jenkins/workspace/gate-keystone-python27/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 68, in _execute_on_connection
2015-06-16 19:32:44.081 | return connection._execute_ddl(self, multiparams, params)
2015-06-16 19:32:44.081 | File "/home/jenkins/workspace/gate-keystone-python27/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 968, in _execute_ddl
2015-06-16 19:32:44.081 | compiled
2015-06-16 19:32:44.081 | File "/home/jenkins/workspace/gate-keystone-python27/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
2015-06-16 19:32:44.082 | context)
2015-06-16 19:32:44.082 | File "/home/jenkins/workspace/gate-keystone-python27/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
2015-06-16 19:32:44.082 | util.raise_from_cause(newraise, exc_info)
2015-06-16 19:32:44.082 | File "/home/jenkins/workspace/gate-keystone-python27/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
2015-06-16 19:32:44.082 | reraise(type(exception), exception, tb=exc_tb)
2015-06-16 19:32:44.082 | File "/home/jenkins/workspace/gate-keystone-python27/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2015-06-16 19:32:44.082 | context)
2015-06-16 19:32:44.082 | File "/home/jenkins/workspace/gate-keystone-python27/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2015-06-16 19:32:44.082 | cursor.execute(statement, parameters)
2015-06-16 19:32:44.082 | sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) near "DROP": syntax error [SQL: u'ALTER TABLE "group" DROP CONSTRAINT fk_group_domain_id']
Old SQLAlchemy didn't return any foreign keys when you called inspector. get_foreign_ keys(table_ name) on sqlite. So before the test code wouldn't try to drop all foreign keys since there were none.
Now that sqlalchemy is returning foreign keys, the tests fail when they try to drop the foreign keys.