FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JWTConnect-Python-OidcMsg/tests/test_13_dump_item.py at develop · IdentityPython/JWTConnect-Python-OidcMsg · GitHub
This repository was archived by the owner on Jun 1, 2023. It is now read-only.
IdentityPython
JWTConnect-Python-OidcMsg
Repository navigation
Code
Issues
3
(3)
Pull requests
1
(1)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
JWTConnect-Python-OidcMsg
/
tests
/
test_13_dump_item.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (24 loc) · 782 Bytes
Breadcrumbs
JWTConnect-Python-OidcMsg
/
tests
/
test_13_dump_item.py
Copy path
File metadata and controls
33 lines (24 loc) · 782 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from
cryptojwt
import
KeyBundle
from
cryptojwt
.
key_bundle
import
build_key_bundle
from
cryptojwt
.
utils
import
qualified_name
from
oidcmsg
.
item
import
DLDict
KEYSPEC
=
[
{
"type"
:
"RSA"
,
"use"
: [
"sig"
]},
{
"type"
:
"EC"
,
"crv"
:
"P-256"
,
"use"
: [
"sig"
]},
]
KEYSPEC_2
=
[
{
"type"
:
"RSA"
,
"use"
: [
"sig"
]},
{
"type"
:
"EC"
,
"crv"
:
"P-256"
,
"use"
: [
"sig"
]},
{
"type"
:
"EC"
,
"crv"
:
"P-384"
,
"use"
: [
"sig"
]},
]
def
test_dl_dict
():
_dict
=
DLDict
()
_kb1
=
build_key_bundle
(
key_conf
=
KEYSPEC
)
_dict
[
"a"
]
=
_kb1
_kb2
=
build_key_bundle
(
key_conf
=
KEYSPEC_2
)
_dict
[
"b"
]
=
_kb2
dump
=
_dict
.
dump
()
_dict_copy
=
DLDict
().
load
(
dump
)
assert
set
(
_dict_copy
.
keys
())
==
{
"a"
,
"b"
}
kb1_copy
=
_dict_copy
[
"a"
]
assert
len
(
kb1_copy
.
keys
())
==
2
Back
|
FazBrowse Home
|
New Git URL