Esempio n. 1
0
    def test_remove_linebreaks_removes_linebreaks(self):
        test_string = "foo\nbar\nbaz"
        result = h.remove_linebreaks(test_string)

        assert (
            result.find("\n") == -1
        ), '"remove_linebreaks" should remove line breaks'
Esempio n. 2
0
    def test_remove_linebreaks_casts_into_unicode(self):
        class UnicodeLike(text_type):
            pass

        test_string = UnicodeLike("foo")
        result = h.remove_linebreaks(test_string)

        strType = u"".__class__
        assert (result.__class__ == strType
                ), '"remove_linebreaks" casts into unicode()'
Esempio n. 3
0
    def test_remove_linebreaks_casts_into_unicode(self):
        class UnicodeLike(unicode):
            pass

        test_string = UnicodeLike('foo')
        result = h.remove_linebreaks(test_string)

        strType = u''.__class__
        assert result.__class__ == strType,\
            '"remove_linebreaks" casts into unicode()'
Esempio n. 4
0
    def test_remove_linebreaks_casts_into_unicode(self):
        class UnicodeLike(unicode):
            pass

        test_string = UnicodeLike('foo')
        result = h.remove_linebreaks(test_string)

        strType = u''.__class__
        assert result.__class__ == strType,\
            '"remove_linebreaks" casts into unicode()'
Esempio n. 5
0
    def test_remove_linebreaks_casts_into_str(self):
        class StringLike(str):
            pass

        test_string = StringLike('foo')
        result = h.remove_linebreaks(test_string)

        strType = ''.__class__
        assert result.__class__ == strType,\
            '"remove_linebreaks" casts into str()'
Esempio n. 6
0
    def test_remove_linebreaks_casts_into_str(self):
        class StringLike(str):
            pass

        test_string = StringLike('foo')
        result = h.remove_linebreaks(test_string)

        strType = ''.__class__
        assert result.__class__ == strType,\
            '"remove_linebreaks" casts into str()'
Esempio n. 7
0
    def test_remove_linebreaks_removes_linebreaks(self):
        test_string = 'foo\nbar\nbaz'
        result = h.remove_linebreaks(test_string)

        assert result.find('\n') == -1,\
            '"remove_linebreaks" should remove line breaks'
Esempio n. 8
0
    def test_remove_linebreaks_removes_linebreaks(self):
        test_string = 'foo\nbar\nbaz'
        result = h.remove_linebreaks(test_string)

        assert result.find('\n') == -1,\
            '"remove_linebreaks" should remove line breaks'