FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Identity Lib
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
Identity and Access Management
Identity Lib
Commits
b346c792
Commit
b346c792
authored
3 years ago
by
Monty Dawson
Browse files
Options
Downloads
Patches
Plain Diff
Update tests for parsing card identifiers
parent
dbc12c88
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!5
Add identifiers for groups and apps
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_card_client.py
+6
-8
6 additions, 8 deletions
tests/test_card_client.py
with
6 additions
and
8 deletions
tests/test_card_client.py
+
6
−
8
View file @
b346c792
...
...
@@ -39,18 +39,16 @@ class TestCardParsingMethods(TestCase):
def
test_get_identifier_by_scheme_can_find_all_ids
(
self
):
test_card
=
TestCardParsingMethods
.
card_with_all_ids
for
id_scheme
in
IdentifierSchemes
.
get_registered_schemes
():
expected_val
=
next
(
(
id
[
'
value
'
]
for
id
in
test_card
[
'
identifiers
'
]
if
id
[
'
scheme
'
]
==
str
(
id_scheme
))
)
for
identifier_dict
in
test_card
[
'
identifiers
'
]:
scheme
=
identifier_dict
[
'
scheme
'
]
value
=
identifier_dict
[
'
value
'
]
self
.
assertEqual
(
CardClient
.
get_identifier_by_scheme
(
test_card
,
id_
scheme
),
f
'
{
expected_
val
}
@
{
id_
scheme
}
'
.
lower
()
CardClient
.
get_identifier_by_scheme
(
test_card
,
scheme
),
f
'
{
val
ue
}
@
{
scheme
}
'
.
lower
()
)
def
test_get_identifier_by_scheme_returns_none_for_no_matching_identifer
(
self
):
def
test_get_identifier_by_scheme_returns_none_for_no_matching_identif
i
er
(
self
):
test_card
=
{
'
identifiers
'
:
[]}
for
id_scheme
in
IdentifierSchemes
.
get_registered_schemes
():
...
...
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