You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
only run with faststream run main:app can avoid this bug , i think this cause by the pytest is not access the app . so there is no Context is injected. is there any way in pytest to access the Global Context ?
@pytest.mark.asyncioasyncdeftest_dependency():
asyncwithTestRabbitBroker(broker, with_real=True) asbr:
# message can not be Noneawaitbr.publish({}, queue="test")
awaitvaea.wait_call(timeout=3)
vaea.mock.assert_called_once_with({})
And/Or steps to reproduce the behavior:
...
Expected behavior
In pytest , the global context should accessable
Observed behavior
can not access the global context variable , and cause missing field error
Screenshots
Environment
Running FastStream 0.5.3 with CPython 3.11.0 on Windows
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
only run with
faststream run main:app
can avoid this bug , i think this cause by the pytest is not access the app . so there is no Context is injected. is there any way in pytest to access the Global Context ?How to reproduce
Include source code:
And/Or steps to reproduce the behavior:
Expected behavior
In pytest , the global context should accessable
Observed behavior
can not access the global context variable , and cause missing field error
Screenshots
![image](https://private-user-images.githubusercontent.com/60957601/326259358-8c8e8781-3d26-4603-aa40-939dd476e297.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkwOTgzMTYsIm5iZiI6MTcxOTA5ODAxNiwicGF0aCI6Ii82MDk1NzYwMS8zMjYyNTkzNTgtOGM4ZTg3ODEtM2QyNi00NjAzLWFhNDAtOTM5ZGQ0NzZlMjk3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIyVDIzMTMzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTlmMjQ1ZTVjNTQ1NWQyNTVlMjgyOTE3OWQxZTc5NWUyNjk3MDYzNzlmOTFlMTRkYTQwYTYxNzBjMDE3Zjg5MGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.IkehYjnRNucECmkOxj740bk6iH02kja5OMlC-c9F5P8)
Environment
Running FastStream 0.5.3 with CPython 3.11.0 on Windows
Additional context
The text was updated successfully, but these errors were encountered: