(
self, mock_deploy, local_flow, work_pool, capsys
)
| 5158 | yield mock_get_inferred |
| 5159 | |
| 5160 | async def test_calls_deploy_with_expected_args( |
| 5161 | self, mock_deploy, local_flow, work_pool, capsys |
| 5162 | ): |
| 5163 | image = DockerImage( |
| 5164 | name="my-repo/my-image", tag="dev", build_kwargs={"pull": False} |
| 5165 | ) |
| 5166 | await local_flow.deploy( |
| 5167 | name="test", |
| 5168 | tags=["price", "luggage"], |
| 5169 | parameters={"name": "Arthur"}, |
| 5170 | concurrency_limit=42, |
| 5171 | description="This is a test", |
| 5172 | version="alpha", |
| 5173 | version_type=VersionType.SIMPLE, |
| 5174 | work_pool_name=work_pool.name, |
| 5175 | work_queue_name="line", |
| 5176 | job_variables={"foo": "bar"}, |
| 5177 | image=image, |
| 5178 | build=False, |
| 5179 | push=False, |
| 5180 | enforce_parameter_schema=True, |
| 5181 | paused=True, |
| 5182 | ) |
| 5183 | |
| 5184 | mock_deploy.assert_called_once_with( |
| 5185 | await local_flow.to_deployment( |
| 5186 | name="test", |
| 5187 | tags=["price", "luggage"], |
| 5188 | parameters={"name": "Arthur"}, |
| 5189 | concurrency_limit=42, |
| 5190 | description="This is a test", |
| 5191 | version="alpha", |
| 5192 | version_type=VersionType.SIMPLE, |
| 5193 | work_queue_name="line", |
| 5194 | job_variables={"foo": "bar"}, |
| 5195 | enforce_parameter_schema=True, |
| 5196 | paused=True, |
| 5197 | ), |
| 5198 | work_pool_name=work_pool.name, |
| 5199 | image=image, |
| 5200 | build=False, |
| 5201 | push=False, |
| 5202 | print_next_steps_message=False, |
| 5203 | ignore_warnings=False, |
| 5204 | ) |
| 5205 | |
| 5206 | console_output = capsys.readouterr().out |
| 5207 | assert "prefect worker start --pool" in console_output |
| 5208 | assert work_pool.name in console_output |
| 5209 | assert "prefect deployment run 'local-flow-deploy/test'" in console_output |
| 5210 | |
| 5211 | async def test_calls_deploy_with_expected_args_remote_flow( |
| 5212 | self, |
nothing calls this directly
no test coverage detected