From 5c603da8ef19acc342cf6da11e4a7c5e0985f81b Mon Sep 17 00:00:00 2001
From: Jocelyn Delande <jocelyn at delalande dot fr>
Date: Sun, 2 Feb 2014 00:56:10 +0100
Subject: [PATCH] Added a topic on testing abstract models
---
docs/topics/testing/advanced.txt | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt
index cbf574a..fd863b6 100644
a
|
b
|
If there are any circular dependencies in the
|
161 | 161 | :setting:`TEST_DEPENDENCIES` definition, an ``ImproperlyConfigured`` |
162 | 162 | exception will be raised. |
163 | 163 | |
| 164 | |
| 165 | .. _topics-testing-abstract-models: |
| 166 | |
| 167 | Testing Abstract models |
| 168 | ======================= |
| 169 | |
| 170 | Django apps providing :ref:`abstract models <abstract-base-classes>` as reusable |
| 171 | components may need to test them by creating a *stub* child class for testing |
| 172 | purposes only. |
| 173 | |
| 174 | As you don't want to put testing-only models inside your :file:`models.py`, |
| 175 | you can write them within the related test file (eg: :file:`myapp/tests.py`). |
| 176 | They will be picked-up by the ORM at test-time and related tables will be |
| 177 | created in the :ref:`the-test-database`. |
| 178 | |
| 179 | |
164 | 180 | Advanced features of ``TransactionTestCase`` |
165 | 181 | ============================================ |
166 | 182 | |