From f836206348002f1673ea337e5043828124f348c5 Mon Sep 17 00:00:00 2001
From: Ben Adida <ben@adida.net>
Date: Sun, 8 Nov 2015 23:56:13 +0000
Subject: [PATCH] added test to cover new can_create_election

---
 helios_auth/tests.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/helios_auth/tests.py b/helios_auth/tests.py
index 7e5b100..f07f309 100644
--- a/helios_auth/tests.py
+++ b/helios_auth/tests.py
@@ -47,6 +47,16 @@ class UserModelTests(unittest.TestCase):
                 self.assertEquals(u2.info['name'], new_name)
 
 
+    def test_can_create_election(self):
+        """
+        check that auth systems have the can_create_election call and that it's true for the common ones
+        """
+        for auth_system, auth_system_module in AUTH_SYSTEMS.iteritems():
+            assert(hasattr(auth_system_module, 'can_create_election'))
+            if auth_system != 'clever':
+                assert(auth_system_module.can_create_election('foobar', {}))
+        
+
     def test_status_update(self):
         """
         check that a user set up with status update ability reports it as such,
-- 
GitLab