Commit 4dd4abca authored by Jérome Perrin's avatar Jérome Perrin

ERP5Security: test that all plugins implement interfaces

parent dc67f5b1
...@@ -752,6 +752,37 @@ class TestPASAPI(UserManagementTestCase): ...@@ -752,6 +752,37 @@ class TestPASAPI(UserManagementTestCase):
verifyClass(IAuthenticationPlugin, ERP5LoginUserManager) verifyClass(IAuthenticationPlugin, ERP5LoginUserManager)
verifyClass(IUserEnumerationPlugin, ERP5LoginUserManager) verifyClass(IUserEnumerationPlugin, ERP5LoginUserManager)
def test_ERP5AccessTokenExtractionPluginInterfaces(self):
"""Tests access token extraction plugin respects interfaces."""
from Products.PluggableAuthService.interfaces.plugins import\
IAuthenticationPlugin, ILoginPasswordHostExtractionPlugin
from Products.ERP5Security.ERP5AccessTokenExtractionPlugin import\
ERP5AccessTokenExtractionPlugin
verifyClass(IAuthenticationPlugin, ERP5AccessTokenExtractionPlugin)
verifyClass(ILoginPasswordHostExtractionPlugin, ERP5AccessTokenExtractionPlugin)
def test_ERP5BearerExtractionPluginInterfaces(self):
"""Tests bearer extraction plugin respects interfaces."""
from Products.PluggableAuthService.interfaces.plugins import\
ILoginPasswordHostExtractionPlugin
from Products.ERP5Security.ERP5BearerExtractionPlugin import\
ERP5BearerExtractionPlugin
verifyClass(ILoginPasswordHostExtractionPlugin, ERP5BearerExtractionPlugin)
def test_ERP5DumbHTTPExtractionPluginInterfaces(self):
"""Tests dumb HTTP extraction plugin respects interfaces."""
from Products.PluggableAuthService.interfaces.plugins import\
ILoginPasswordHostExtractionPlugin
from Products.ERP5Security.ERP5DumbHTTPExtractionPlugin import\
ERP5DumbHTTPExtractionPlugin
verifyClass(ILoginPasswordHostExtractionPlugin, ERP5DumbHTTPExtractionPlugin)
def test_RoleManagerInterfaces(self):
"""Tests role manager plugin respects interfaces."""
from Products.PluggableAuthService.interfaces.plugins import IRolesPlugin
from Products.ERP5Security.ERP5RoleManager import ERP5RoleManager
verifyClass(IRolesPlugin, ERP5RoleManager)
def test_UserFolder(self): def test_UserFolder(self):
"""Tests user folder has correct meta type.""" """Tests user folder has correct meta type."""
self.assertTrue(isinstance(self.getUserFolder(), self.assertTrue(isinstance(self.getUserFolder(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment