more import fixes

This commit is contained in:
iElectric
2010-02-05 19:09:18 +01:00
parent 043ceb899e
commit 2996433753
2 changed files with 7 additions and 3 deletions

View File

@@ -0,0 +1,4 @@
# make this package available during imports as long as we support <python2.5
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)))

View File

@@ -9,8 +9,8 @@ from migrate.versioning import exceptions, version, repository
from migrate.versioning.script import *
from migrate.versioning.util import *
from test import fixture
from test.fixture.models import tmp_sql_table
from tests import fixture
from tests.fixture.models import tmp_sql_table
class TestBaseScript(fixture.Pathed):
@@ -226,7 +226,7 @@ class TestSqlScript(fixture.Pathed, fixture.DB):
# populate python script
contents = open(script_path, 'r').read()
contents = contents.replace("pass", "tmp_sql_table.create(migrate_engine)")
contents = 'from test.fixture.models import tmp_sql_table\n' + contents
contents = 'from tests.fixture.models import tmp_sql_table\n' + contents
f = open(script_path, 'w')
f.write(contents)
f.close()