File: test_migration_not_found.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 (18 lines) | stat: -rw-r--r-- 542 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import pytest

from django_test_migrations import exceptions


@pytest.mark.parametrize(
    ('target', 'expected_str'),
    [
        (('app', None), "Migration ('app', None) not found in migrations plan"),
        (
            ('app', '0047_magic'),
            "Migration ('app', '0047_magic') not found in migrations plan",
        ),
    ],
)
def test_representation(target, expected_str):
    """Ensure ``MigrationNotInPlan`` has expected string representation."""
    assert str(exceptions.MigrationNotInPlan(target)) == expected_str