[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GMG-Devel] Fixing SQLAlchemy session issue in test_collection_selection
From: |
Ben Sturmfels |
Subject: |
[GMG-Devel] Fixing SQLAlchemy session issue in test_collection_selection |
Date: |
Thu, 19 Sep 2019 19:35:30 +1000 |
User-agent: |
mu4e 1.2.0; emacs 26.3 |
Hi Folks,
I'd love a hand fixing test_collection_selection() if anyone was able to
lend some SQLAlchemy experience. On current master, if I run:
./runtests.sh
mediagoblin/tests/test_submission.py::TestSubmissionBasics::test_collection_selection
This fails deep in some templating code run by
self.test_app.get('/submit/') on test_submission.py:502. The issue
appears to in the rendering of the collection select box where the
If I use "./runtests.sh --pdb", and try to look at "obj", the current
collection being rendered, I get:
sqlalchemy.orm.exc.DetachedInstanceError: Instance <Collection at
0x7f770332feb8> is not bound to a Session; attribute refresh operation cannot
proceed (Background on this error at: http://sqlalche.me/e/bhk3)
So I gather the Collection that was created by fixture_add_collection()
is trying to lazy load itself, but no longer has a reference to the
database. Any ideas why this may be?
Regards,
Ben
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GMG-Devel] Fixing SQLAlchemy session issue in test_collection_selection,
Ben Sturmfels <=