django-test-migrations
django-test-migrations copied to clipboard
Test django schema and data migrations, including migrations' order and best practices.
Let's say I have three models (`ModelA`, ModelB`, and `ModelC`) across three apps. Their migrations look like this: ``` ("my_app_a", "0001_initial") # 1 ("my_app_a", "0002_add_fields") # 3, depends on #...
My migration is doing something like the following: Note: Parent and Child are both subclasses of Activity, and there is a generic relation between them (not sure if this is...
I am still thinking about the test (how to write the simplest and minimal version of it), so this PR is a draft, but feel free to write some suggestions...
I'm running into a problem when I apply a migration with `Migrator.apply_initial_migration()` and then try to construct model instances using the returned app state. One model has a foreign key...
In my project I have two databases. When testing a migration I got the following error: ``` Database queries to 'secondary' are not allowed in this test. Add 'secondary' to...
Today I found a code like this: ```python class Migration(migrations.Migration): # initial = True dependencies = [] ``` And this was an initial migration for an app. This suprised me:...
`django_test_migration` is growing, so it's `pytest` plugin also, e.g. in #138 more logic was added to it. Currently, most tests use `subprocess` to run `pytest` and make some assertions on...
In #91 we are introducing new Django check that validate `system timeout` settings on following database: + `postgresql` -`statement_timeout` + `mysql` - `max_execution_time` The idea behind this group of checks...
In #91 we are introducing more Django checks and according to plans this number of checks will grown, so it's time to establish some rules of check messages levels and...
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.9.0 to 3.10.0. Release notes Sourced from pytest-mock's releases. v3.10.0 Added new mocker.stop(m) method to stop specific mocker.patch or mocker.spy calls (#319). Changelog Sourced from pytest-mock's changelog....