| |
@@ -69,6 +69,7 @@
|
| |
self.assertEqual(output.status_code, 200)
|
| |
self.assertTrue('Candidates <span class="label label-pill label-default">3</span>' in output_text)
|
| |
|
| |
+ @patch("fedora_elections.fedmsgshim.publish", MagicMock())
|
| |
def test_admin_no_cla(self):
|
| |
""" Test the admin_new_election function. """
|
| |
self.setup_db()
|
| |
@@ -85,6 +86,7 @@
|
| |
output = self.app.get('/admin/new')
|
| |
self.assertEqual(output.status_code, 403)
|
| |
|
| |
+ @patch("fedora_elections.fedmsgshim.publish", MagicMock())
|
| |
def test_admin_new_election(self):
|
| |
""" Test the admin_new_election function. """
|
| |
self.setup_db()
|
| |
@@ -379,6 +381,7 @@
|
| |
'name="max_votes" type="text" '
|
| |
'value="">', output_text)
|
| |
|
| |
+ @patch("fedora_elections.fedmsgshim.publish", MagicMock())
|
| |
def test_admin_edit_election(self):
|
| |
""" Test the admin_edit_election function. """
|
| |
user = FakeUser(
|
| |
@@ -522,6 +525,7 @@
|
| |
'value="2">', output_text)
|
| |
self.assertTrue('Candidates <span class="label label-pill label-default">3</span>' in output_text)
|
| |
|
| |
+ @patch("fedora_elections.fedmsgshim.publish", MagicMock())
|
| |
def test_admin_edit_election_admin_groups(self):
|
| |
""" Test the admin_edit_election function when editing admin groups.
|
| |
"""
|
| |
@@ -642,6 +646,7 @@
|
| |
'name="admin_grp" type="text" '
|
| |
'value="sysadmin-main">', output_text)
|
| |
|
| |
+ @patch("fedora_elections.fedmsgshim.publish", MagicMock())
|
| |
def test_admin_edit_election_legal_voters(self):
|
| |
""" Test the admin_edit_election function when editing legal voters.
|
| |
"""
|
| |
@@ -747,6 +752,7 @@
|
| |
'name="lgl_voters" type="text" '
|
| |
'value="sysadmin-main">', output_text)
|
| |
|
| |
+ @patch("fedora_elections.fedmsgshim.publish", MagicMock())
|
| |
def test_admin_add_candidate(self):
|
| |
""" Test the admin_add_candidate function. """
|
| |
user = FakeUser(
|
| |
@@ -839,6 +845,7 @@
|
| |
in output_text)
|
| |
self.assertTrue('Candidates <span class="label label-pill label-default">4</span>' in output_text)
|
| |
|
| |
+ @patch("fedora_elections.fedmsgshim.publish", MagicMock())
|
| |
def test_admin_add_multi_candidate(self):
|
| |
""" Test the admin_add_multi_candidate function. """
|
| |
user = FakeUser(
|
| |
@@ -929,6 +936,7 @@
|
| |
in output_text)
|
| |
self.assertTrue('Candidates <span class="label label-pill label-default">6</span>' in output_text)
|
| |
|
| |
+ @patch("fedora_elections.fedmsgshim.publish", MagicMock())
|
| |
def test_admin_edit_candidate(self):
|
| |
""" Test the admin_edit_candidate function. """
|
| |
user = FakeUser(
|
| |
@@ -1040,6 +1048,7 @@
|
| |
self.assertTrue('Candidates <span class="label label-pill label-default">3</span>' in output_text)
|
| |
self.assertTrue('<div class="list-group-item">Toshio' in output_text)
|
| |
|
| |
+ @patch("fedora_elections.fedmsgshim.publish", MagicMock())
|
| |
def test_admin_delete_candidate(self):
|
| |
""" Test the admin_delete_candidate function. """
|
| |
user = FakeUser(
|
| |