# Path: djangocodemirror/exceptions.py
# class UnknowThemeError(KeyError):
#     pass


import pytest
from django.conf import settings
from djangocodemirror.exceptions import UnknowThemeError
"""
Tests against manifest for CSS assets
"""




def test_css_empty_registry(settings, manifesto):
    """Empty registry"""
    assert manifesto.css() == settings.CODEMIRROR_BASE_CSS


def test_css_registred_empty(settings, manifesto):
    """An empty registred config"""
    manifesto.autoregister()

    assert manifesto.css('empty') == settings.CODEMIRROR_BASE_CSS


def test_resolve_theme_success(settings, manifesto):
    """Resolve a theme name"""
    result = manifesto.resolve_theme('ambiance')
    attempt = settings.CODEMIRROR_THEMES['ambiance']

    assert result == attempt


def test_resolve_theme_error(settings, manifesto):
    """Try to resolve a theme name that does not exist"""

# Path: djangocodemirror/exceptions.py
# class UnknowThemeError(KeyError):
#     pass


# Path: tests/001_manifest/test_003_css.py
import pytest
from django.conf import settings
from djangocodemirror.exceptions import UnknowThemeError

"""
Tests against manifest for CSS assets
"""




def test_css_empty_registry(settings, manifesto):
    """Empty registry"""
    assert manifesto.css() == settings.CODEMIRROR_BASE_CSS


def test_css_registred_empty(settings, manifesto):
    """An empty registred config"""
    manifesto.autoregister()

    assert manifesto.css('empty') == settings.CODEMIRROR_BASE_CSS


def test_resolve_theme_success(settings, manifesto):
    """Resolve a theme name"""
    result = manifesto.resolve_theme('ambiance')
    attempt = settings.CODEMIRROR_THEMES['ambiance']

    assert result == attempt


def test_resolve_theme_error(settings, manifesto):
    """Try to resolve a theme name that does not exist"""

    with pytest.raises(UnknowThemeError):