Django: Best way to unit-test an abstract model

后端 未结 13 1376
一个人的身影
一个人的身影 2020-12-24 12:28

I need to write some unit tests for an abstract base model, that provides some basic functionality that should be used by other apps. It it would be necessary to define a mo

13条回答
  •  猫巷女王i
    2020-12-24 13:10

    Testing an abstract class is not too useful, as a derived class can override its methods. The other applications are responsible for testing their classes based on your abstract class.

提交回复
热议问题