comparison pylons_app/websetup.py @ 491:fefffd6fd5f4 celery

Added some more tests, rewrite testing schema, to autogenerate fresh db, new index. cleaned up some codes that involves testing.
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 21 Sep 2010 01:08:01 +0200
parents 6b934c9607e7
children
comparison
equal deleted inserted replaced
490:74b9bed279ae 491:fefffd6fd5f4
17 """Place any commands to setup pylons_app here""" 17 """Place any commands to setup pylons_app here"""
18 log_sql = True 18 log_sql = True
19 tests = False 19 tests = False
20 REPO_TEST_PATH = None 20 REPO_TEST_PATH = None
21 21
22 dbname = os.path.split(conf['sqlalchemy.db1.url'])[-1] 22 dbname = os.path.split(conf['sqlalchemy.db1.url'])[-1]
23 # filename = os.path.split(conf.filename)[-1]
24 # if filename == 'test.ini':
25 # uniq_suffix = str(int(mktime(datetime.datetime.now().timetuple())))
26 # REPO_TEST_PATH = '/tmp/hg_app_test_%s' % uniq_suffix
27 #
28 # if not os.path.isdir(REPO_TEST_PATH):
29 # os.mkdir(REPO_TEST_PATH)
30 # cur_dir = dn(os.path.abspath(__file__))
31 # tar = tarfile.open(jn(cur_dir,'tests',"vcs_test.tar.gz"))
32 # tar.extractall(REPO_TEST_PATH)
33 # tar.close()
34 #
35 # tests = True
36 23
37 dbmanage = DbManage(log_sql, dbname, tests) 24 dbmanage = DbManage(log_sql, dbname, tests)
38 dbmanage.create_tables(override=True) 25 dbmanage.create_tables(override=True)
39 dbmanage.config_prompt(REPO_TEST_PATH) 26 dbmanage.config_prompt(REPO_TEST_PATH)
40 dbmanage.create_default_user() 27 dbmanage.create_default_user()