sandbox/python/modules/pytest_imports_2.puml
2026-02-13 17:36:23 +03:00

24 lines
637 B
Text

@startuml
title Импорт внутри функции (работает)
participant "pytest" as P
participant "test_module" as T
participant "review_task.py" as R
participant "db.maas()" as D
participant "settings" as S
P -> T: import test_module
note right: Импорта MaasReviewTask нет!
P -> P: setup fixtures
P -> S: configure settings
S --> P: settings ready
P -> T: run test_track_work_time()
T -> R: import MaasReviewTask
note right: Импорт происходит ЗДЕСЬ
R -> R: define class MaasReviewTask
R -> D: COLLECTION = db.maas().review_tasks
D -> S: get_mongo_uri('maas')
S --> D: Success!
@enduml