2

My goal is to mock my DAO class's methods so that I can preform unit tests without having to send a request to the database.

Currently, my plan is to use mock to set the return type of a specific method that returns a object of type sqlalchemy.engine.row.Row. However, I cannot find documentation on how to manually create this object.

Can someone point me in the right direction or show me how to create that object?

desap
  • 169
  • 1
  • 15

1 Answers1

0

Just for futur vistors who might land on this page, as pointed out by snakecharmerb-on-strike, using a python builtin named tuple will do the job.