Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pytest .
- C:\Users\mikko\AppData\Local\pypoetry\Cache\virtualenvs\direction-service-5yPH-rNJ-py3.12\Lib\site-packages\pytest_asyncio\plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
- The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
- warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
- =============================================================== test session starts ===============================================================
- platform win32 -- Python 3.12.5, pytest-8.3.3, pluggy-1.5.0
- rootdir: D:\Work\Mentor\direction-service
- configfile: pytest.ini
- plugins: anyio-4.6.0, asyncio-0.24.0, cov-5.0.0, reportlog-0.4.0
- asyncio: mode=Mode.AUTO, default_loop_scope=None
- collected 12 items
- tests\integrations\test_student_to_topic.py .... [ 33%]
- tests\rabbitmq\test_direction_event_producer.py . [ 41%]
- tests\rabbitmq\test_event_producer.py .. [ 58%]
- tests\rabbitmq\test_task_event_consumer.py ....F [100%]
- ==================================================================== FAILURES =====================================================================
- ___________________________________________________ TestTaskEventConsumer.test_get_message_task ___________________________________________________
- self = <tests.rabbitmq.test_task_event_consumer.TestTaskEventConsumer object at 0x000001E0D21AFBC0>
- event_consumer = <app.rabbitmq.event_consumer.EventConsumer object at 0x000001E0D2473320>
- def test_get_message_task(
- self,
- event_consumer: TaskEventConsumer
- ) -> None:
- """Тестирует получение сообщений.
- Публикует сообщение получено из топика task-event от TestTaskProducer.
- """
- body = {
- 'studentId': 5,
- 'taskId': 9,
- 'topicId': 12,
- 'isFinal': True
- }
- > assert_that(
- actual_or_assertion=event_consumer.get_message(),
- matcher=equal_to(body)
- )
- E AssertionError:
- E Expected: <{'studentId': 5, 'taskId': 9, 'topicId': 12, 'isFinal': True}>
- E but: was <{'test': 'test'}>
- tests\rabbitmq\test_task_event_consumer.py:130: AssertionError
- ============================================================= short test summary info =============================================================
- FAILED tests/rabbitmq/test_task_event_consumer.py::TestTaskEventConsumer::test_get_message_task - AssertionError:
- ========================================================== 1 failed, 11 passed in 2.69s ===========================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement