# Path: djedi/utils/encoding.py

# 
# Path: djedi/tests/base.py
# class ClientTest(DjediTest, UserMixin, AssertionMixin):
# 
#     def setUp(self):
#         super(ClientTest, self).setUp()
#         master = self.create_djedi_master()
#         client = Client(enforce_csrf_checks=True)
#         client.login(username=master.username, password='test')
#         self.client = client
# 
# Path: djedi/compat.py
# def patterns(*urls):
#         def parse_bits(parser, bits, params, varargs, varkw, defaults,
#                        takes_context, name):
#     def generic_tag_compiler(parser, token, params, varargs, varkw, defaults,
#                              name, takes_context, node_class):
#         def __init__(self, *args, **kwargs):
#     def get_cache(name):
#     def getargspec(func):
#     class TemplateResponse(BaseTemplateResponse):


from unittest import skip
from djedi.utils.encoding import smart_unicode
from djedi.tests.base import ClientTest
from ..compat import reverse
        from django.contrib.admin.templatetags.log import AdminLogNode
import cio.conf


class PanelTest(ClientTest):

    def test_embed(self):
        url = reverse('index')
        response = self.client.get(url)
        self.assertIn(u'Djedi Test', smart_unicode(response.content))
        self.assertIn(u'window.DJEDI_NODES', smart_unicode(response.content))
        self.assertIn(u'i18n://sv-se@foo/bar.txt', smart_unicode(response.content))
        self.assertIn(u'</body>', smart_unicode(response.content).lower())

    def test_middleware(self):
        with self.settings(MIDDLEWARE_CLASSES=[
            'djedi.middleware.translation.DjediTranslationMiddleware',
        ], MIDDLEWARE=[
            'djedi.middleware.translation.DjediTranslationMiddleware',
        ]):
            url = reverse('index')
            response = self.client.get(url)
            self.assertNotIn(u'window.DJEDI_NODES',
                             smart_unicode(response.content))

    def test_cms(self):

# Path: djedi/utils/encoding.py

# 
# Path: djedi/tests/base.py
# class ClientTest(DjediTest, UserMixin, AssertionMixin):
# 
#     def setUp(self):
#         super(ClientTest, self).setUp()
#         master = self.create_djedi_master()
#         client = Client(enforce_csrf_checks=True)
#         client.login(username=master.username, password='test')
#         self.client = client
# 
# Path: djedi/compat.py
# def patterns(*urls):
#         def parse_bits(parser, bits, params, varargs, varkw, defaults,
#                        takes_context, name):
#     def generic_tag_compiler(parser, token, params, varargs, varkw, defaults,
#                              name, takes_context, node_class):
#         def __init__(self, *args, **kwargs):
#     def get_cache(name):
#     def getargspec(func):
#     class TemplateResponse(BaseTemplateResponse):


# Path: djedi/tests/test_admin.py
from unittest import skip
from djedi.utils.encoding import smart_unicode
from djedi.tests.base import ClientTest
from ..compat import reverse
        from django.contrib.admin.templatetags.log import AdminLogNode
import cio.conf



class PanelTest(ClientTest):

    def test_embed(self):
        url = reverse('index')
        response = self.client.get(url)
        self.assertIn(u'Djedi Test', smart_unicode(response.content))
        self.assertIn(u'window.DJEDI_NODES', smart_unicode(response.content))
        self.assertIn(u'i18n://sv-se@foo/bar.txt', smart_unicode(response.content))
        self.assertIn(u'</body>', smart_unicode(response.content).lower())

    def test_middleware(self):
        with self.settings(MIDDLEWARE_CLASSES=[
            'djedi.middleware.translation.DjediTranslationMiddleware',
        ], MIDDLEWARE=[
            'djedi.middleware.translation.DjediTranslationMiddleware',
        ]):
            url = reverse('index')
            response = self.client.get(url)
            self.assertNotIn(u'window.DJEDI_NODES',
                             smart_unicode(response.content))

    def test_cms(self):

        url = reverse('admin:djedi:cms')