tickets: 7835
This data as json
id | created | changetime | last_pulled_from_trac | stage | status | component | type | severity | version | resolution | summary | description | owner | reporter | keywords | easy | has_patch | needs_better_patch | needs_tests | needs_docs | ui_ux |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7835 | 2008-07-19 14:41:05 | 2021-10-01 12:43:47 | 2022-03-06 03:40:40.896101 | Accepted | new | Testing framework | New feature | Normal | dev | Provide the ability for model definitions that are only availably during testing | A current limitation of the unit test framework is that there is no capacity to define 'test models' - that is, models that are only required for the purposes of testing. A regular installation would not know anything about these models - only a test database would have access to them. There are several existing applications that have a need for this capability: For example: * contrib.admin: you can't test the way admin handles models without some models to handle. * contrib.databrowse: you can't test the way the browser works without having models to browse * Django Evolution: you can't evolve models without having some models to evolve. The easiest way to work around this at present is to have a standalone test project which exercises the required functionality. However, these tests aren't integrated into the automated test suite, so they. Another option is to do some app_cache munging during the test - this works, but is very messy. Django should provide a way for model definitions to be defined as part of the test definition, synchronized as part of the test setup, populated and manipulated during test execution, and destroyed along with the test database. | nobody | russellm | feature test models | 0 | 0 | 0 | 0 | 0 | 0 |