MCPcopy Create free account
hub / github.com/celery/celery / test_pydantic_string_annotations

Method test_pydantic_string_annotations

t/integration/test_tasks.py:224–235  ·  view source on GitHub ↗

Tests task call with string-annotated Pydantic model.

(self, manager)

Source from the content-addressed store, hash-verified

222
223 @flaky
224 def test_pydantic_string_annotations(self, manager):
225 """Tests task call with string-annotated Pydantic model."""
226 results = []
227 # Tests calling task only with args
228 for i in range(10):
229 results.append([i + i, add_pydantic_string_annotations.delay({'x': i, 'y': i})])
230 for expected, result in results:
231 value = result.get(timeout=10)
232 assert value == {'result': expected}
233 assert result.status == 'SUCCESS'
234 assert result.ready() is True
235 assert result.successful() is True
236
237 @flaky
238 def test_pydantic_model_arguments(self, manager):

Callers

nothing calls this directly

Calls 4

delayMethod · 0.45
getMethod · 0.45
readyMethod · 0.45
successfulMethod · 0.45

Tested by

no test coverage detected