Ignore:
Timestamp:
9 Jan 2015, 17:32:29 (10 years ago)
Author:
Henrik Bettermann
Message:

Add helpers test.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/documents/document.py

    r12408 r12434  
    1717##
    1818"""
    19 These are the document tickets.
     19These are the public documents.
    2020"""
    2121import os
  • main/waeup.ikoba/trunk/src/waeup/ikoba/utils/tests/test_helpers.py

    r12230 r12434  
    583583        assert info is None
    584584
     585
    585586class Html2dictTestCase(unittest.TestCase):
    586587
     
    594595            'de': u'<div id="html">Hallo Welt</div id="html">',
    595596            'en': u'<div id="html">Hello world</div id="html">'}
     597
     598
     599class Rest2dictTestCase(unittest.TestCase):
     600
     601    def test_rest2dict(self):
     602        assert helpers.rest2dict(None) == {}
     603        assert helpers.rest2dict() == {}
     604        assert helpers.rest2dict(9) == {}
     605        assert helpers.rest2dict('Hello world') == {
     606            'en': u'<div id="rest"><div class="document">\n\n\n<p>Hello world'
     607                   '</p>\n</div></div id="rest">'}
     608        assert helpers.rest2dict('Hello world>>de<<Hallo Welt') == {
     609            'de': u'<div id="rest"><div class="document">\n\n\n<p>Hallo Welt'
     610                   '</p>\n</div></div id="rest">',
     611            'en': u'<div id="rest"><div class="document">\n\n\n<p>Hello world'
     612                   '</p>\n</div></div id="rest">'}
    596613
    597614
     
    616633        GetMemInfoTestCase,
    617634        Html2dictTestCase,
     635        Rest2dictTestCase,
    618636        ]:
    619637        suite.addTests(
Note: See TracChangeset for help on using the changeset viewer.