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'
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()'
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()'
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()'
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'