I have created a method that parses the docstrings of my app models and generates documentation. As part of testing this method, I need to create pseudo-models with specific properties and fields that will help test the functionality.
However, I am encountering an issue where these test models are being added to the AppConfig and are treated as part of the app. This causes them to interfere with the rest of the app, as they are included in apps.get_models()
and may affect the rest of the app’s behavior.
Goal: I want to create these test models within my TestClass
in a way that:
- The models only exist during the test execution.
- They do not get added to
AppConfig
or interfere with the app’s normal behavior. - They are only used for the purpose of testing the documentation generation method, with fields and properties that are tailored for this purpose.
Is there a handy solution for this?