@@ -175,6 +175,7 @@ def test_publish_filepath(server: TSC.Server) -> None:
175175 cv ._owner = TSC .UserItem ()
176176 cv ._owner ._id = "dd2239f6-ddf1-4107-981a-4cf94e415794"
177177 cv .workbook = TSC .WorkbookItem ()
178+ assert cv .workbook is not None
178179 cv .workbook ._id = "1f951daf-4061-451a-9df1-69a8062664f2"
179180 with requests_mock .mock () as m :
180181 m .post (server .custom_views .expurl , status_code = 201 , text = GET_XML .read_text ())
@@ -191,6 +192,7 @@ def test_publish_file_str(server: TSC.Server) -> None:
191192 cv ._owner = TSC .UserItem ()
192193 cv ._owner ._id = "dd2239f6-ddf1-4107-981a-4cf94e415794"
193194 cv .workbook = TSC .WorkbookItem ()
195+ assert cv .workbook is not None
194196 cv .workbook ._id = "1f951daf-4061-451a-9df1-69a8062664f2"
195197 with requests_mock .mock () as m :
196198 m .post (server .custom_views .expurl , status_code = 201 , text = GET_XML .read_text ())
@@ -207,6 +209,7 @@ def test_publish_file_io(server: TSC.Server) -> None:
207209 cv ._owner = TSC .UserItem ()
208210 cv ._owner ._id = "dd2239f6-ddf1-4107-981a-4cf94e415794"
209211 cv .workbook = TSC .WorkbookItem ()
212+ assert cv .workbook is not None
210213 cv .workbook ._id = "1f951daf-4061-451a-9df1-69a8062664f2"
211214 data = io .BytesIO (CUSTOM_VIEW_DOWNLOAD .read_bytes ())
212215 with requests_mock .mock () as m :
@@ -223,6 +226,7 @@ def test_publish_missing_owner_id(server: TSC.Server) -> None:
223226 cv = TSC .CustomViewItem (name = "test" )
224227 cv ._owner = TSC .UserItem ()
225228 cv .workbook = TSC .WorkbookItem ()
229+ assert cv .workbook is not None
226230 cv .workbook ._id = "1f951daf-4061-451a-9df1-69a8062664f2"
227231 with requests_mock .mock () as m :
228232 m .post (server .custom_views .expurl , status_code = 201 , text = GET_XML .read_text ())
@@ -246,6 +250,7 @@ def test_large_publish(server: TSC.Server):
246250 cv ._owner = TSC .UserItem ()
247251 cv ._owner ._id = "dd2239f6-ddf1-4107-981a-4cf94e415794"
248252 cv .workbook = TSC .WorkbookItem ()
253+ assert cv .workbook is not None
249254 cv .workbook ._id = "1f951daf-4061-451a-9df1-69a8062664f2"
250255 with ExitStack () as stack :
251256 temp_dir = stack .enter_context (TemporaryDirectory ())
0 commit comments