def test__unicode__(self):
        empty = Tag('em')
        assert unicode(empty.lower()) == ''
        assert unicode(empty.capitalize()) == ''
        assert unicode(empty.add_period()) == ''

        assert unicode(Tag('strong', u'ねここねこ')) == u'ねここねこ'
예제 #2
0
    def test__str__(self):
        empty = Tag('em')
        assert six.text_type(empty.lower()) == ''
        assert six.text_type(empty.capitalize()) == ''
        assert six.text_type(empty.add_period()) == ''

        assert six.text_type(Tag('strong', u'ねここねこ')) == u'ねここねこ'
예제 #3
0
    def test__unicode__(self):
        empty = Tag('em')
        assert unicode(empty.lower()) == ''
        assert unicode(empty.capitalize()) == ''
        assert unicode(empty.add_period()) == ''

        assert unicode(Tag('strong', u'ねここねこ')) == u'ねここねこ'
 def test_capitalize(self):
     tag = Tag('em', Text(), Text('mary ', 'had ', 'a Little Lamb'))
     assert tag.capitalize().render_as('html') == '<em>Mary had a little lamb</em>'
예제 #5
0
 def test_capitalize(self):
     tag = Tag('em', Text(), Text('mary ', 'had ', 'a Little Lamb'))
     assert tag.capitalize().render_as('html') == '<em>Mary had a little lamb</em>'