OpenSlides/tests/projector/test_widgets.py
Oskar Hahn d937262d28 Use flake8 instead of pep8. Orderd the imports with isort
* changed the fab-command pep8 to check
* checked and fixed any code with flake8. Also the urls.py
* checkt the projector app with pylint
2013-10-14 18:43:12 +02:00

28 lines
850 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Tests for openslides widgets
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TODO: Move this test to the correct place when the projector app is cleaned up.
:copyright: 20112013 by OpenSlides team, see AUTHORS.
:license: GNU GPL, see LICENSE for more details.
"""
from django.http import HttpRequest
from openslides.projector.projector import Widget
from openslides.utils.exceptions import OpenSlidesError
from openslides.utils.test import TestCase
class WidgetObject(TestCase):
def test_error(self):
with self.assertRaises(OpenSlidesError):
Widget(HttpRequest(), name='chahghuyeim8ie0Noong')
def test_repr(self):
w = Widget(HttpRequest(), name='abcdefgäöüß', html='<strong>html</strong>')
self.assertEqual(repr(w), repr('Abcdefgäöüß'))