X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=mediagoblin%2Ftests%2Ftest_sql_migrations.py;h=7e0569adcb349327f8943a9973f2d9fa1230d208;hb=207f0f95a9599118927455650e0cbeb933a8aecc;hp=3d67fdf636cb1e2de1339a2be000547f017113f9;hpb=e1561d048815e29b3b7c7e1c860d9cf0c4326f0a;p=mediagoblin.git diff --git a/mediagoblin/tests/test_sql_migrations.py b/mediagoblin/tests/test_sql_migrations.py index 3d67fdf6..7e0569ad 100644 --- a/mediagoblin/tests/test_sql_migrations.py +++ b/mediagoblin/tests/test_sql_migrations.py @@ -14,6 +14,11 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +import six +import pytest + +pytestmark = pytest.mark.skipif(six.PY3, reason='needs sqlalchemy.migrate') + import copy from sqlalchemy import ( @@ -23,7 +28,8 @@ from sqlalchemy import ( from sqlalchemy.orm import sessionmaker, relationship from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.sql import select, insert -from migrate import changeset +if six.PY2: + from migrate import changeset from mediagoblin.db.base import GMGTableBase from mediagoblin.db.migration_tools import MigrationManager, RegisterMigration @@ -190,7 +196,7 @@ def level_exits_new_table(db_conn): for level in result: - for exit_name, to_level in level['exits'].iteritems(): + for exit_name, to_level in six.iteritems(level['exits']): # Insert the level exit db_conn.execute( level_exits.insert().values(