12
12
import pytest
13
13
import requests
14
14
from docker .errors import BuildError , NotFound
15
- from docker .models .containers import Container
16
15
from mock_vws .database import VuforiaDatabase
17
16
from tenacity import retry
18
17
from tenacity .retry import retry_if_exception_type
@@ -115,7 +114,7 @@ def test_build_and_run(
115
114
vwq_tag = f"vws-mock-vwq:latest-{ random } "
116
115
117
116
try :
118
- target_manager_image , _ = client .images .build ( # pyright: ignore[reportUnknownMemberType]
117
+ target_manager_image , _ = client .images .build (
119
118
path = str (repository_root ),
120
119
dockerfile = str (dockerfile ),
121
120
tag = target_manager_tag ,
@@ -136,15 +135,15 @@ def test_build_and_run(
136
135
reason = "We do not currently support using Windows containers."
137
136
)
138
137
139
- vwq_image , _ = client .images .build ( # pyright: ignore[reportUnknownMemberType]
138
+ vwq_image , _ = client .images .build (
140
139
path = str (repository_root ),
141
140
dockerfile = str (dockerfile ),
142
141
tag = vwq_tag ,
143
142
target = "vwq" ,
144
143
rm = True ,
145
144
)
146
145
147
- vws_image , _ = client .images .build ( # pyright: ignore[reportUnknownMemberType]
146
+ vws_image , _ = client .images .build (
148
147
path = str (repository_root ),
149
148
dockerfile = str (dockerfile ),
150
149
tag = vws_tag ,
@@ -158,14 +157,14 @@ def test_build_and_run(
158
157
f"http://{ target_manager_container_name } :5000"
159
158
)
160
159
161
- target_manager_container = client .containers .run ( # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType ]
160
+ target_manager_container = client .containers .run ( # pyright: ignore[reportUnknownMemberType]
162
161
image = target_manager_image ,
163
162
detach = True ,
164
163
name = target_manager_container_name ,
165
164
publish_all_ports = True ,
166
165
network = custom_bridge_network .name ,
167
166
)
168
- vws_container = client .containers .run ( # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType ]
167
+ vws_container = client .containers .run ( # pyright: ignore[reportUnknownMemberType]
169
168
image = vws_image ,
170
169
detach = True ,
171
170
name = "vws-mock-vws-" + random ,
@@ -175,7 +174,7 @@ def test_build_and_run(
175
174
"TARGET_MANAGER_BASE_URL" : target_manager_internal_base_url ,
176
175
},
177
176
)
178
- vwq_container = client .containers .run ( # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType ]
177
+ vwq_container = client .containers .run ( # pyright: ignore[reportUnknownMemberType]
179
178
image = vwq_image ,
180
179
detach = True ,
181
180
name = "vws-mock-vwq-" + random ,
@@ -186,9 +185,6 @@ def test_build_and_run(
186
185
},
187
186
)
188
187
189
- assert isinstance (target_manager_container , Container )
190
- assert isinstance (vws_container , Container )
191
- assert isinstance (vwq_container , Container )
192
188
for container in (target_manager_container , vws_container , vwq_container ):
193
189
container .reload ()
194
190
0 commit comments