FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 2478a312 authored by Monty Dawson's avatar Monty Dawson :coffee:
Browse files

Test coverage for openapi code paths

parent 09eabe35
No related branches found
No related tags found
1 merge request!1Initial implementation
Pipeline #172592 passed
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']
}
]
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment