Missed some changes in models.__init__.py. After transplanting them, it works.
But the second question remains. Is there way to access the session after the testapp request is finished.
Regards Estartu Am 11.06.24 um 08:18 schrieb Gerhard Schmidt:
Hi, im doing some unit testing. The following test works fine def test_template_submit_functional(testapp, dbsession): test_data = (('subject', 'Das ist ein test'), ('plain_body', dummy_text), ('form.submit', 'Speichern') ) response = testapp.post('/config/mails/instance_removal_imminent', params=test_data, status=302)assert response.location == 'http://example.com/config/mails/templates'The call should create an entry in the database. When i try to find the object via dbsession.query() nothing is found.I've done single step debugging and the view function is executed correctly and all changes to the database are there.While debugging, I found that there is a different dbsession in the request object inside the testapp call than in the test function.Another question. Is there a way to access the session object to verify changes there.Regards Estartu
-- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/038969e5-ba94-43cd-aad0-557655c38e0b%40augusta.de.
OpenPGP_0x3EE6A5DC78826E6B.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
