示例#1
0
 def test_make_html_links(self):
     test = [('url1', 'name1'), ('url2', 'name2')]
     links = utils.make_html_links(test)
     self.assertEqual(len(links.split(' | ')), 2)
     self.assertIn('url1', links)
     self.assertIn('name1', links)
     self.assertIn('url2', links)
     self.assertIn('name2', links)
示例#2
0
 def test_make_html_links(self):
     test = [('url1', 'name1'), ('url2', 'name2')]
     links = utils.make_html_links(test)
     self.assertEqual(len(links.split(' | ')), 2)
     self.assertIn('url1', links)
     self.assertIn('name1', links)
     self.assertIn('url2', links)
     self.assertIn('name2', links)
示例#3
0
 def test_make_html_links(self):
     test = [('url1', 'name1'), ('url2', 'name2'), ('url3', 'name3',
                                                    'POST')]
     links = utils.make_html_links(test)
     self.assertEqual(len(links.split(' | ')), 3)
     self.assertIn('url1', links)
     self.assertIn('name1', links)
     self.assertIn('url2', links)
     self.assertIn('name2', links)
     self.assertIn('href="#"', links)
     self.assertIn('data-post-url="url3"', links)
     self.assertIn('name3', links)
示例#4
0
文件: tests.py 项目: jakubste/oioioi
 def test_make_html_links(self):
     test = [('url1', 'name1'), ('url2', 'name2'),
             ('url3', 'name3', 'POST')]
     links = utils.make_html_links(test)
     self.assertEqual(len(links.split(' | ')), 3)
     self.assertIn('url1', links)
     self.assertIn('name1', links)
     self.assertIn('url2', links)
     self.assertIn('name2', links)
     self.assertIn('href="#"', links)
     self.assertIn('data-post-url="url3"', links)
     self.assertIn('name3', links)
示例#5
0
文件: admin.py 项目: matrach/oioioi
 def actions_field(self, instance):
     return make_html_links(self.inline_actions(instance))
示例#6
0
文件: admin.py 项目: cytadela8/oioioi
 def actions_field(self, instance):
     return make_html_links(self.inline_actions(instance))
示例#7
0
 def inner(instance):
     inline_actions = self.inline_actions(instance, contest)
     return make_html_links(inline_actions)
示例#8
0
文件: admin.py 项目: wczyz/oioioi
 def inner(instance):
     inline_actions = self.inline_actions(instance, contest)
     return make_html_links(inline_actions)