Ticket #1090 (closed defect: invalid)
tests fail with KeyError: 'default'
|Reported by:||Ian Delaney <della5@…>||Owned by:||andrew|
doing a version bump to 0.7.5. It appears the tests are not able to be run perhaps until installed.
- Testing of dev-python/south-0.7.5 with CPython 2.7...
Traceback (most recent call last):
File "south/tests/autodetection.py", line 3, in <module>
File "/mnt/gen2/TmpDir/portage/dev-python/south-0.7.5/work/andrewgodwin-south-3f6f2066c47c/build-2.7/lib/south/creator/changes.py", line 10, in <module>
from south.creator.freezer import remove_useless_attributes, freeze_apps, model_key
File "/mnt/gen2/TmpDir/portage/dev-python/south-0.7.5/work/andrewgodwin-south-3f6f2066c47c/build-2.7/lib/south/creator/freezer.py", line 11, in <module>
from south.orm import FakeORM
File "/mnt/gen2/TmpDir/portage/dev-python/south-0.7.5/work/andrewgodwin-south-3f6f2066c47c/build-2.7/lib/south/orm.py", line 12, in <module>
from south.db import db
File "/mnt/gen2/TmpDir/portage/dev-python/south-0.7.5/work/andrewgodwin-south-3f6f2066c47c/build-2.7/lib/south/db/init.py", line 78, in <module>
db = dbs[DEFAULT_DB_ALIAS]
Now I'm no south expert but I have touched on several django related packages and got the test suites to run. I cannot figure what is going on from the documented help. From docs/unittests.rst;
If you want the test runner to use syncdb instead of migrate - for example, if
your migrations are taking way too long to apply - simply set
SOUTH_TESTS_MIGRATE = False in settings.py.
You can also set SKIP_SOUTH_TESTS=True in settings.py
Well excuse my confusion but which settings.py where? There is no such settings.py in the source. The installed is in
with 2 folders between conf & settings.py. Do you need to make 1?
The django tool to run tests is a manage.py, but from the packages I have dealt with it's not an installed manage.py but one made for the 'project'. There is again no manage.py. The tests are there but I can't run them as they appear to be missing something. I cannot fathom that you need to edit an installed settings.py file to run a south test suite, it doesn't make sense.