How to make a function raise a psycopg2 exception with diag.message_detail set?

后端 未结 0 1501
余生分开走
余生分开走 2021-01-27 23:16

I am new to unit testing in Python. I am trying to test my functions that call psycopg2 methods to interact with a Postgresql database. I am able to mock the database connection

相关标签:
回答
  • 消灭零回复
提交回复
热议问题