Mercurial > kallithea
comparison rhodecode/tests/_test_concurency.py @ 1749:8ecc6b8229a5 beta
commit less models
- models don't do any commits(with few exceptions)
- all db transactions should be handled by higher level modules like controllers, celery tasks
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 02 Dec 2011 22:31:13 +0200 |
parents | 48d4fcf04a29 |
children | a8c66e870bd0 |
comparison
equal
deleted
inserted
replaced
1748:a3ee2611e6e8 | 1749:8ecc6b8229a5 |
---|---|
79 return stdout, stderr | 79 return stdout, stderr |
80 | 80 |
81 def get_session(): | 81 def get_session(): |
82 engine = engine_from_config(conf, 'sqlalchemy.db1.') | 82 engine = engine_from_config(conf, 'sqlalchemy.db1.') |
83 init_model(engine) | 83 init_model(engine) |
84 sa = meta.Session() | 84 sa = meta.Session |
85 return sa | 85 return sa |
86 | 86 |
87 | 87 |
88 def create_test_user(force=True): | 88 def create_test_user(force=True): |
89 print 'creating test user' | 89 print 'creating test user' |