netzkolchose / django-computedfields

Provides autogenerated autoupdated database fields for model methods.
MIT License
94 stars 14 forks source link

How to use patch function of mock on computed methods of models (for unit tests) ? #152

Closed stygmate closed 3 months ago

stygmate commented 3 months ago

I want to add unit test for counting the calls to some critical computed field methods in my models. But i can't find what or how to patch the methods for having access to call_count on each one.