def test_links(self): user = AuthUserFactory() project = ProjectFactory(creator=user) wiki = NodeWikiFactory( content='[[wiki2]]', user=user, node=project, ) assert_in( project.web_url_for('project_wiki_page', wname='wiki2'), wiki.html(project), )
def test_bad_links(self): content = u'<span></span><iframe src="http://httpbin.org/"></iframe>' node = ProjectFactory() wiki = NodeWikiFactory(content=content, node=node) expected = render_content(content, node) assert_equal(expected, wiki.html(node))