Advertisement
M1KK0

kotsur-output

Oct 7th, 2024
30
0
22 hours
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.48 KB | Software | 0 0
  1. pytest .
  2. 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.
  3. 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"
  4.  
  5.   warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
  6. =============================================================== test session starts ===============================================================
  7. platform win32 -- Python 3.12.5, pytest-8.3.3, pluggy-1.5.0
  8. rootdir: D:\Work\Mentor\direction-service
  9. configfile: pytest.ini
  10. plugins: anyio-4.6.0, asyncio-0.24.0, cov-5.0.0, reportlog-0.4.0
  11. asyncio: mode=Mode.AUTO, default_loop_scope=None
  12. collected 12 items                                                                                                                                
  13.  
  14. tests\integrations\test_student_to_topic.py ....                                                                                             [ 33%]
  15. tests\rabbitmq\test_direction_event_producer.py .                                                                                            [ 41%]
  16. tests\rabbitmq\test_event_producer.py ..                                                                                                     [ 58%]
  17. tests\rabbitmq\test_task_event_consumer.py ....F                                                                                             [100%]
  18.  
  19. ==================================================================== FAILURES =====================================================================
  20. ___________________________________________________ TestTaskEventConsumer.test_get_message_task ___________________________________________________
  21.  
  22. self = <tests.rabbitmq.test_task_event_consumer.TestTaskEventConsumer object at 0x000001E0D21AFBC0>
  23. event_consumer = <app.rabbitmq.event_consumer.EventConsumer object at 0x000001E0D2473320>
  24.  
  25.     def test_get_message_task(
  26.             self,
  27.             event_consumer: TaskEventConsumer
  28.     ) -> None:
  29.         """Тестирует получение сообщений.
  30.  
  31.        Публикует сообщение получено из топика task-event от TestTaskProducer.
  32.        """
  33.         body = {
  34.             'studentId': 5,
  35.             'taskId': 9,
  36.             'topicId': 12,
  37.             'isFinal': True
  38.         }
  39.  
  40. >       assert_that(
  41.             actual_or_assertion=event_consumer.get_message(),
  42.             matcher=equal_to(body)
  43.         )
  44. E       AssertionError:
  45. E       Expected: <{'studentId': 5, 'taskId': 9, 'topicId': 12, 'isFinal': True}>
  46. E            but: was <{'test': 'test'}>
  47.  
  48. tests\rabbitmq\test_task_event_consumer.py:130: AssertionError
  49. ============================================================= short test summary info =============================================================
  50. FAILED tests/rabbitmq/test_task_event_consumer.py::TestTaskEventConsumer::test_get_message_task - AssertionError:
  51. ========================================================== 1 failed, 11 passed in 2.69s ===========================================================
Tags: pytest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement