Пример #1
0
 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),
     )
Пример #2
0
 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),
     )
Пример #3
0
 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))
Пример #4
0
 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))