Issue 11: test suite fails with postgresql, psycopg2, and django trunk
Status:  Fixed
Owner:
Closed:  Feb 2008
Reported by lauber.p...@gmail.com, Jan 22, 2008
Failed example:
    action = Genre.objects.create(name='Action')
Exception raised:
    Traceback (most recent call last):
      File "/Users/patricklauber/Documents/Workspace/django/django/test/_doctest.py", line 
1267, in __run
        compileflags, 1) in test.globs
      File "<doctest mptt.tests[5]>", line 1, in <module>
        action = Genre.objects.create(name='Action')
      File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/django/db/models/manager.py", line 75, in create
      File "/Users/patricklauber/Documents/Workspace/django/django/db/models/query.py", line 
274, in create
        obj.save()
      File "/Users/patricklauber/Documents/Workspace/django/django/db/models/base.py", line 
212, in save
        dispatcher.send(signal=signals.pre_save, sender=self.__class__, instance=self)
      File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/django/dispatch/dispatcher.py", line 360, in send
      File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/django/dispatch/robustapply.py", line 47, in robustApply
      File "/Users/patricklauber/Documents/Workspace/apointi/py_src/mptt/signals.py", line 75, 
in pre_save
        instance.insert_at(parent, position='last-child')
      File "/Users/patricklauber/Documents/Workspace/apointi/py_src/mptt/models.py", line 158, 
in insert_at
        self._tree_manager.insert_node(self, target, position, commit)
      File "/Users/patricklauber/Documents/Workspace/apointi/py_src/mptt/managers.py", line 
127, in insert_node
        setattr(node, self.tree_id_attr, self._get_next_tree_id())
      File "/Users/patricklauber/Documents/Workspace/apointi/py_src/mptt/managers.py", line 
280, in _get_next_tree_id
        qn(opts.db_table)))
    ProgrammingError: relation "tests_genre" does not exist


 
Jan 22, 2008
Project Member #1 jonathan.buchanan
Was this happening as a result of testing your own application. Since the tests
depends on the mptt.tests app being in INSTALLED_APPS (as mptt doesn't have any
models  itself), I've moved them so they'll only be run when you have 'mptt.tests' in
your INSTALLED_APPS.
Status: Accepted
Owner: jonathan.buchanan
Feb 6, 2008
Project Member #2 jonathan.buchanan
Fixed in revision 93
Status: Fixed