Simon Willison’s Weblog

Subscribe

Sunday, 15th January 2023

How to simulate a broken database connection for testing in Django (via) Neil Kakkar explores the options using unittest.patch() and then settles on a neater pattern using “with connection.execute_wrapper(QueryTimeoutWrapper()):” to simulate the exact exception he needs to test against. # 8:31 pm

Weeknotes: AI hacking and a SpatiaLite tutorial

Short weeknotes this time because the key things I worked on have already been covered here:

[... 477 words]

2023 » January

MTWTFSS
      1
2345678
9101112131415
16171819202122
23242526272829
3031