Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
4dd4abca
Commit
4dd4abca
authored
Apr 30, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Security: test that all plugins implement interfaces
parent
dc67f5b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
product/ERP5Security/tests/testERP5Security.py
product/ERP5Security/tests/testERP5Security.py
+31
-0
No files found.
product/ERP5Security/tests/testERP5Security.py
View file @
4dd4abca
...
@@ -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
(),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment