File: test_exceptions.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 (20 lines) | stat: -rw-r--r-- 656 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from django_test_migrations.db.backends import exceptions


def test_database_configuration_not_found():
    """Ensure exception returns proper string representation."""
    vendor = 'ms_sql'
    exception = exceptions.DatabaseConfigurationNotFound(vendor)
    assert vendor in str(exception)


def test_database_configuration_setting_not_found():
    """Ensure exception returns proper string representation."""
    vendor = 'ms_sql'
    setting_name = 'fake_setting'
    exception = exceptions.DatabaseConfigurationSettingNotFound(
        vendor,
        setting_name,
    )
    assert vendor in str(exception)
    assert setting_name in str(exception)