FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
API Gateway Auth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Information Services
DevOps
Django Libraries
API Gateway Auth
Commits
2478a312
Commit
2478a312
authored
3 years ago
by
Monty Dawson
Browse files
Options
Downloads
Patches
Plain Diff
Test coverage for openapi code paths
parent
09eabe35
No related branches found
No related tags found
1 merge request
!1
Initial implementation
Pipeline
#172592
passed
3 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apigatewayauth/tests/test_openapi.py
+24
-0
24 additions, 0 deletions
apigatewayauth/tests/test_openapi.py
with
24 additions
and
0 deletions
apigatewayauth/tests/test_openapi.py
0 → 100644
+
24
−
0
View file @
2478a312
from
django.test
import
TestCase
from
apigatewayauth.openapi
import
any_api_service_security_method_with_scopes
class
OpenAPITestCase
(
TestCase
):
def
test_any_api_service_security_method_with_scopes
(
self
):
"""
Test that the service definitions are returned for a given set of scopes.
"""
self
.
assertListEqual
(
any_api_service_security_method_with_scopes
(
'
read
'
,
'
write
'
,
'
admin
'
),
[
{
'
API Service OAuth2 Client Credentials
'
:
[
'
read
'
,
'
write
'
,
'
admin
'
]
},
{
'
API Service OAuth2 Access Code
'
:
[
'
read
'
,
'
write
'
,
'
admin
'
]
}
]
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment