1 """Unit test cases for testing you application's model classes.
2
3 If your project uses a database, you should set up database tests similar to
4 what you see below.
5
6 Be sure to set the ``db_uri`` in the ``test.cfg`` configuration file in the
7 top-level directory of your project to an appropriate uri for your testing
8 database. SQLite is a good choice for testing, because you can use an in-memory
9 database which is very fast and the data in it has to be boot-strapped from
10 scratch every time, so the tests are independant of any pre-existing data.
11
12 You can also set the ``db_uri``directly in this test file but then be sure
13 to do this before you import your model, e.g.::
14
15 from turbogears import testutil, database
16 database.set_db_uri("sqlite:///:memory:")
17 from eggbasket.model import YourModelClass, User, ...
18 """
19
20 from turbogears import testutil, database
21
22
23
24
25
26
27
28
29
30
31
32
33
34