File: conftest.py

package info (click to toggle)
python-django-test-migrations 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 436 kB
  • sloc: python: 1,479; makefile: 26
file content (19 lines) | stat: -rw-r--r-- 613 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import pytest
from django.db.migrations import Migration


@pytest.fixture
def plan():
    """Fake migrations plan for testing purposes."""
    migrations_plan = [
        Migration('0001_initial', 'app1'),
        Migration('0002_second', 'app1'),
        Migration('0001_initial', 'app2'),
        Migration('0003_third', 'app1'),
        Migration('0004_fourth', 'app1'),
        Migration('0002_second', 'app2'),
        Migration('0005_fifth', 'app1'),
        Migration('0001_initial', 'app3'),
        Migration('0006_sixth', 'app1'),
    ]
    return [(migration, False) for migration in migrations_plan]