File tree 3 files changed +27
-1
lines changed
3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ class Config:
63
63
extra = Extra .forbid
64
64
65
65
type : Literal ["DIDCommMessaging" ] = "DIDCommMessaging"
66
- service_endpoint : List [DIDCommV2ServiceEndpoint ]
66
+ service_endpoint : Union [ List [DIDCommV2ServiceEndpoint ], DIDCommV2ServiceEndpoint ]
67
67
68
68
69
69
class UnknownService (Service ):
Original file line number Diff line number Diff line change 54
54
}
55
55
],
56
56
},
57
+ {
58
+ "id" : "did:example:123456789abcdefghi#didcomm-1" ,
59
+ "type" : "DIDCommMessaging" ,
60
+ "serviceEndpoint" : {
61
+ "uri" : "https://example.com/path" ,
62
+ "accept" : ["didcomm/v2" , "didcomm/aip2;env=rfc587" ],
63
+ "routingKeys" : ["did:example:somemediator#somekey" ],
64
+ },
65
+ },
57
66
]
58
67
59
68
INVALID_SERVICES = [
@@ -172,6 +181,15 @@ def test_serialization(service_raw):
172
181
}
173
182
],
174
183
},
184
+ {
185
+ "id" : "did:example:123456789abcdefghi#didcomm-1" ,
186
+ "type" : "DIDCommMessaging" ,
187
+ "serviceEndpoint" : {
188
+ "uri" : "https://example.com/path" ,
189
+ "accept" : ["didcomm/v2" , "didcomm/aip2;env=rfc587" ],
190
+ "routingKeys" : ["did:example:somemediator#somekey" ],
191
+ },
192
+ },
175
193
]
176
194
177
195
DIDCOMM_INVALID_SERVICES = [
Original file line number Diff line number Diff line change @@ -162,6 +162,14 @@ def test_validator_allow_missing_controller():
162
162
"publicKeyBase58" : "12345" ,
163
163
},
164
164
)
165
+ with pytest .raises (ValueError ):
166
+ vmethod = VerificationMethod .deserialize (
167
+ {
168
+ "id" : "hi" ,
169
+ "type" : "Ed25519Signature2018" ,
170
+ "publicKeyBase58" : "12345" ,
171
+ },
172
+ )
165
173
166
174
167
175
def test_make ():
You can’t perform that action at this time.
0 commit comments