Example #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)
Example #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)
Example #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)
Example #4
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)
Example #5
0
 def actions_field(self, instance):
     return make_html_links(self.inline_actions(instance))
Example #6
0
 def actions_field(self, instance):
     return make_html_links(self.inline_actions(instance))
Example #7
0
 def inner(instance):
     inline_actions = self.inline_actions(instance, contest)
     return make_html_links(inline_actions)
Example #8
0
 def inner(instance):
     inline_actions = self.inline_actions(instance, contest)
     return make_html_links(inline_actions)