From face6a56024aed2c9181c7e9cbbd9a3e1c765c88 Mon Sep 17 00:00:00 2001 From: Noah Zoschke Date: Wed, 18 May 2011 07:48:19 -0700 Subject: [PATCH] test fixes; update src of injected code --- test/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/__main__.py b/test/__main__.py index ffd2baa..91f82d3 100644 --- a/test/__main__.py +++ b/test/__main__.py @@ -2,8 +2,8 @@ import os import re import unittest +BIN_DIR = os.path.dirname(__file__) DATABASES = {} -ROOTDIR = os.path.dirname(__file__) class TestInjectDBs(unittest.TestCase): def setUp(self): @@ -22,7 +22,7 @@ class TestInjectDBs(unittest.TestCase): Test the code injected into settings.py to map ENV to settings.DATABASES hash """ # read and exec code in this context - with open(os.path.join(ROOTDIR, "..", "opt/dbs.py")) as _src: + with open(os.path.join(BIN_DIR, "..", "opt/dbs.py.src")) as _src: exec compile(_src.read(), "dbs.py", "exec") self.assertEqual(5, len(DATABASES)) # default, DATABASE, ONYX, RED, SHARED_DATABASE