Open cutz opened 5 years ago
Hmm. Why are we trying to create a new MockDataserver on test tearDown
? That doesn't seem at all right. (Line numbers in mock_dataserver.py traceback don't match master.)
Most likely what's going on here is the shortcut taken in the connection tween, as described by the last sentence: https://github.com/NextThought/nti.dataserver/blob/26d1637a59ce57a78460fe5f88787879b5226cae/src/nti/appserver/tweens/zodb_connection_tween.py#L52-L57
That's true for the real appserver, but not true for app-layer tests. The nti.testing hooks to reset the global manager to implicit don't get a chance to run in app-layer tests (because they use shared setup).
It'll cost a tiny bit of speed, but probably the simplest thing is to have the tween reverse that change on the way out.
On master I'm getting past the AssertionError and now I'm on to test assertion errors in the actual tests. That's some progress.....
For instance there are now tests in nti.app.products.courseware_admin (among others) failing with the following assertion failure.