~ubuntu-branches/ubuntu/trusty/heat/trusty-security

« back to all changes in this revision

Viewing changes to heat/tests/__init__.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Yolanda Robla, Chuck Short
  • Date: 2013-07-22 16:22:29 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130722162229-zzvfu40id94ii0hc
Tags: 2013.2~b2-0ubuntu1
[ Yolanda Robla ]
* debian/tests: added autopkg tests

[ Chuck Short ]
* New upstream release
* debian/control:
  - Add python-pbr to build-depends.
  - Add python-d2to to build-depends.
  - Dropped python-argparse.
  - Add python-six to build-depends.
  - Dropped python-sendfile.
  - Dropped python-nose.
  - Added testrepository.
  - Added python-testtools.
* debian/rules: Run testrepository instead of nosetets.
* debian/patches/removes-lxml-version-limitation-from-pip-requires.patch: Dropped
  no longer needed.
* debian/patches/fix-package-version-detection-when-building-doc.patch: Dropped
  no longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
# The code below enables nosetests to work with i18n _() blocks
17
17
import __builtin__
18
18
setattr(__builtin__, '_', lambda x: x)
19
 
 
20
 
import os
21
 
 
22
 
from heat.db.sqlalchemy.session import get_engine
23
 
 
24
 
 
25
 
def reset_db():
26
 
    if os.path.exists('heat-test.db'):
27
 
        os.remove('heat-test.db')
28
 
 
29
 
 
30
 
def setup():
31
 
    import mox  # pyflakes_bypass   Workaround for bug 810424
32
 
    from heat.db import migration
33
 
    from heat import db  # pyflakes_bypass review 23102
34
 
 
35
 
    reset_db()
36
 
    migration.db_sync()
37
 
    engine = get_engine()
38
 
    conn = engine.connect()