# Create Test-Only Models Without Affecting AppConfig

**URL:** <https://forum.djangoproject.com/t/create-test-only-models-without-affecting-appconfig/38576>\
**Category:** Using Django\
**Created:** [February 5, 2025, 10:41am UTC](https://forum.djangoproject.com/t/create-test-only-models-without-affecting-appconfig/38576 "2025-02-05T10:41:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![csercelj](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/csercelj/32/26726_2.png) [@csercelj](https://forum.djangoproject.com/u/csercelj)\
**Post date:** [February 5, 2025, 10:41am UTC](https://forum.djangoproject.com/t/create-test-only-models-without-affecting-appconfig/38576/1 "2025-02-05T10:41:21Z")

</div>

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?
