File: test_migrations.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 (12 lines) | stat: -rw-r--r-- 460 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
from django_test_migrations.logic.migrations import normalize


def test_normalize_raw_target():
    """Ensure normalize works for ``MigrationTarget``."""
    assert normalize(('app', '0074_magic')) == [('app', '0074_magic')]


def test_normalize_list_of_targets():
    """Ensure normalize works for list of ``MigrationTarget``."""
    migration_targets = [('app1', None), ('app2', '0001_initial')]
    assert normalize(migration_targets) == migration_targets