File tree 2 files changed +35
-0
lines changed
2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+
13
+ import pretend
14
+
15
+ from warehouse import attestations
16
+ from warehouse .attestations .interfaces import IIntegrityService
17
+ from warehouse .attestations .services import IntegrityService
18
+
19
+
20
+ def test_includeme ():
21
+ config = pretend .stub (
22
+ register_service_factory = pretend .call_recorder (
23
+ lambda factory , iface , name = None : None
24
+ ),
25
+ )
26
+
27
+ attestations .includeme (config )
28
+
29
+ assert config .register_service_factory .calls == [
30
+ pretend .call (IntegrityService .create_service , IIntegrityService ),
31
+ ]
Original file line number Diff line number Diff line change 25
25
"IntegrityService" ,
26
26
"UnsupportedPublisherError" ,
27
27
]
28
+
29
+
30
+ def includeme (config ):
31
+ config .register_service_factory (IntegrityService .create_service , IIntegrityService )
You can’t perform that action at this time.
0 commit comments