# Path: tests/pods_utils.py
# def clear_app_settings_cache():
#     # Clean up. Django Pods caches settings once loaded. Remove cached settings
#     from silhouette.apps import Silhouette
#     if hasattr(Silhouette.settings, 'PATH'):
#         del Silhouette.settings.PATH
#     if hasattr(Silhouette.settings, 'THEME'):
#         del Silhouette.settings.THEME
#     if hasattr(Silhouette.settings, 'PATTERNS'):
#         del Silhouette.settings.PATTERNS
# 
# Path: tests/mock/forms.py
# class MockForm(forms.Form):
# class MockForm2(forms.Form):
# 
# Path: tests/mock/tags.py
# class MockTag(BaseSilhouette):
# 
#     def get_extra_context(self):
#         ctx = {"obj": self.obj}
#         # merge if any "cascaded_*" attributes in context
#         attrs = self.merge_attrs(self.cascaded_attrs('cascaded'), self.kwargs)
#         # cascade any "cascaded_*" attributes to sub contexts
#         attrs = self.build_attrs(attrs, 'cascaded')
#         ctx.update(attrs)
#         return ctx


from django.test import SimpleTestCase
from django.template.context import Context
    from django.template.base import TemplateDoesNotExist
    from django.template.exceptions import TemplateDoesNotExist
    from django.template.loader import get_template_from_string
    from django.template import engines
from django.test.utils import override_settings
from .pods_utils import clear_app_settings_cache
from .mock.forms import MockForm, MockFormSet
from .mock.tags import MockTag
from __future__ import unicode_literals

try:
except ImportError:
try:
except ImportError:
    get_template_from_string = engines['django'].from_string





@override_settings(SILHOUETTE_PATH="test_tags/base/silhouette",
                   SILHOUETTE_PATTERNS = {"mock_tag": ("{path}/{theme}/{form}.html",)})
class TestBaseTag(SimpleTestCase):

    def setUp(self):
        self.form = MockForm()
        self.context = Context({"myform": self.form})

    def tearDown(self):
        self.context = None

# Path: tests/pods_utils.py
# def clear_app_settings_cache():
#     # Clean up. Django Pods caches settings once loaded. Remove cached settings
#     from silhouette.apps import Silhouette
#     if hasattr(Silhouette.settings, 'PATH'):
#         del Silhouette.settings.PATH
#     if hasattr(Silhouette.settings, 'THEME'):
#         del Silhouette.settings.THEME
#     if hasattr(Silhouette.settings, 'PATTERNS'):
#         del Silhouette.settings.PATTERNS
# 
# Path: tests/mock/forms.py
# class MockForm(forms.Form):
# class MockForm2(forms.Form):
# 
# Path: tests/mock/tags.py
# class MockTag(BaseSilhouette):
# 
#     def get_extra_context(self):
#         ctx = {"obj": self.obj}
#         # merge if any "cascaded_*" attributes in context
#         attrs = self.merge_attrs(self.cascaded_attrs('cascaded'), self.kwargs)
#         # cascade any "cascaded_*" attributes to sub contexts
#         attrs = self.build_attrs(attrs, 'cascaded')
#         ctx.update(attrs)
#         return ctx


# Path: tests/test_tags.py
from django.test import SimpleTestCase
from django.template.context import Context
    from django.template.base import TemplateDoesNotExist
    from django.template.exceptions import TemplateDoesNotExist
    from django.template.loader import get_template_from_string
    from django.template import engines
from django.test.utils import override_settings
from .pods_utils import clear_app_settings_cache
from .mock.forms import MockForm, MockFormSet
from .mock.tags import MockTag

from __future__ import unicode_literals

try:
except ImportError:
try:
except ImportError:
    get_template_from_string = engines['django'].from_string





@override_settings(SILHOUETTE_PATH="test_tags/base/silhouette",
                   SILHOUETTE_PATTERNS = {"mock_tag": ("{path}/{theme}/{form}.html",)})
class TestBaseTag(SimpleTestCase):

    def setUp(self):
        self.form = MockForm()
        self.context = Context({"myform": self.form})

    def tearDown(self):
        self.context = None

        clear_app_settings_cache()