# Path: tests/_utils.py
# class HatbandTestCase(ArmstrongTestCase):
#     pass
# 
# Path: armstrong/hatband/widgets/ckeditor.py
# class CKEditorWidget(widgets.Textarea):
#     class Media:
#         js = (static("ckeditor/ckeditor.js"),)
# 
#     def __init__(self, attrs=None):
#         final_attrs = {'class': 'ckeditor'}
#         if attrs is not None:
#             final_attrs.update(attrs)
#             if 'class' in attrs:
#                 final_attrs['class'] = ' '.join((attrs['class'], 'ckeditor'))
#         super(CKEditorWidget, self).__init__(attrs=final_attrs)


from .._utils import HatbandTestCase
from armstrong.hatband.widgets import CKEditorWidget


class CKEditorTestCase(HatbandTestCase):

    def test_render(self):
        widget = CKEditorWidget()
        htmlout = str(widget.render('widget', ''))
        self.assertTrue('class="ckeditor"' in htmlout)

    def test_render_with_additional_classes(self):

# Path: tests/_utils.py
# class HatbandTestCase(ArmstrongTestCase):
#     pass
# 
# Path: armstrong/hatband/widgets/ckeditor.py
# class CKEditorWidget(widgets.Textarea):
#     class Media:
#         js = (static("ckeditor/ckeditor.js"),)
# 
#     def __init__(self, attrs=None):
#         final_attrs = {'class': 'ckeditor'}
#         if attrs is not None:
#             final_attrs.update(attrs)
#             if 'class' in attrs:
#                 final_attrs['class'] = ' '.join((attrs['class'], 'ckeditor'))
#         super(CKEditorWidget, self).__init__(attrs=final_attrs)


# Path: tests/widgets/ckeditor.py
from .._utils import HatbandTestCase
from armstrong.hatband.widgets import CKEditorWidget



class CKEditorTestCase(HatbandTestCase):

    def test_render(self):
        widget = CKEditorWidget()
        htmlout = str(widget.render('widget', ''))
        self.assertTrue('class="ckeditor"' in htmlout)

    def test_render_with_additional_classes(self):

        widget = CKEditorWidget(attrs={'class': 'something'})