diff pylons_app/config/environment.py @ 473:6b934c9607e7 celery

Improved testing scenarios. Made test env creator Fixed hg_model error message some other tweeks and fixes Models fixe for uniq email, and removed some extra not needed imports from model main module
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 13 Sep 2010 01:23:58 +0200
parents e94f4e54dc03
children fefffd6fd5f4
line wrap: on
line diff
--- a/pylons_app/config/environment.py	Sun Sep 12 22:42:03 2010 +0200
+++ b/pylons_app/config/environment.py	Mon Sep 13 01:23:58 2010 +0200
@@ -49,7 +49,10 @@
 
     #sets the c attribute access when don't existing attribute are accessed
     config['pylons.strict_tmpl_context'] = True
-    test = os.path.split(config['__file__'])[-1] == 'tests.ini'
+    test = os.path.split(config['__file__'])[-1] == 'test.ini'
+    if test:
+        from pylons_app.lib.utils import make_test_env
+        make_test_env()
     #MULTIPLE DB configs
     # Setup the SQLAlchemy database engine
     if config['debug'] and not test: