-
Recent Posts
Recent Comments
Joe Rybicki on Paste as plain text with … bl4ckb1rd on Adding a session to a Django r… Rag on Copying the config from a Cisc… Mike on Copying the config from a Cisc… JIBBER!!!! on Adding a session to a Django r… Archives
Category Archives: django
Lead astray by the symptom
I was instantiating a Django subclass in a test, and it wasn’t setting one of the foreign key fields. We are subclassing an Order class, and was doing: OurOrder.objects.create(other=other) When I retrieved the object from the database later, it wasn’t … Continue reading
Posted in django
Leave a comment
Adding a session to a Django request generated by RequestFactory
The Django RequestFactory is a useful tool for writing unit tests against Django views. I was using it to test some code that interacts with Cartridge, and ran into trouble because the RequestFactory doesn’t annotate request objects with Session objects, which … Continue reading