be able to add fixtures once and for all for all tests, instead of loading them again and again for each test, if running on a database that supports transaction rollbacks. In this case, fixtures specified in the perma_fixtures class attribute will be loaded permanently, and not re-loaded. Fixtures specifice as before, in a fixtures class attribute, will be treated as before. The downside of this is that as fixtures are loaded and not unloaded, they can conflict with each other. The requirements on consistency becomes much greater. The effect of this has been to require quite a bit of changes to the simplified creations of various objects in make_test_data() in cases where identically named objects occur in fixtures. Where completely fictitious objects are created, no conflicts appear. Also re-wrote parts of test_runner.py to permit global fixtures, loaded before any tests are run and shared by all. - Legacy-Id: 6318
13 lines
380 B
Python
13 lines
380 B
Python
# Copyright The IETF Trust 2007, All Rights Reserved
|
|
|
|
from log import log
|
|
from cache_foreign_key import FKAsOneToOne
|
|
from draft_search import normalize_draftname
|
|
from test_utils import TestCase
|
|
|
|
# See http://docs.python.org/tut/node8.html regarding the use of __all__ and
|
|
# also regarding the practice of using "from xxx import *" in interactive
|
|
# sessions vs. in source files.
|
|
|
|
|