def test__render_data_highlight(self): item_name = u'Text_Item' item = Text.create(item_name) contenttype = u'text/plain' meta = {CONTENTTYPE: contenttype} item._save(meta) item1 = Text.create(item_name) data = 'test_data\nnext line' comment = u'next revision' item1._save(meta, data, comment=comment) item2 = Text.create(item_name) result = Text._render_data_highlight(item2) assert u'<pre class="highlight">test_data\n' in result assert item2.data == ''