Skip to content

Commit

Permalink
fixed admin_scripts tests on python 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
apollo13 committed Feb 26, 2013
1 parent 0dc7ff6 commit 1535fcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/admin_scripts/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def _ext_backend_paths(self):

def run_test(self, script, args, settings_file=None, apps=None):
project_dir = test_dir
base_dir = os.path.dirname(project_dir)
base_dir = os.path.dirname(test_dir)
import django
django_dir = os.path.dirname(os.path.dirname(django.__file__))
tests_dir = os.path.join(django_dir, 'tests')
Expand All @@ -126,7 +126,7 @@ def run_test(self, script, args, settings_file=None, apps=None):
os.environ['DJANGO_SETTINGS_MODULE'] = settings_file
elif 'DJANGO_SETTINGS_MODULE' in os.environ:
del os.environ['DJANGO_SETTINGS_MODULE']
python_path = [project_dir, base_dir, django_dir, tests_dir]
python_path = [base_dir, django_dir, tests_dir]
python_path.extend(ext_backend_base_dirs)
os.environ[python_path_var_name] = os.pathsep.join(python_path)

Expand Down

0 comments on commit 1535fcf

Please sign in to comment.