MCPcopy
hub / github.com/celery/celery / test_pydantic_string_annotations

Method test_pydantic_string_annotations

t/integration/test_tasks.py:147–158  ·  view source on GitHub ↗

Tests task call with string-annotated Pydantic model.

(self, manager)

Source from the content-addressed store, hash-verified

145
146 @flaky
147 def test_pydantic_string_annotations(self, manager):
148 """Tests task call with string-annotated Pydantic model."""
149 results = []
150 # Tests calling task only with args
151 for i in range(10):
152 results.append([i + i, add_pydantic_string_annotations.delay({'x': i, 'y': i})])
153 for expected, result in results:
154 value = result.get(timeout=10)
155 assert value == {'result': expected}
156 assert result.status == 'SUCCESS'
157 assert result.ready() is True
158 assert result.successful() is True
159
160 @flaky
161 def test_timeout(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