Skip to content

Commit

Permalink
tests: fix NATS OS tes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lancetnik committed Jun 14, 2024
1 parent c445a11 commit e23eccc
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions tests/docs/nats/js/test_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,9 @@
async def test_basic():
from docs.docs_src.nats.js.object import app, broker, handler

async with TestNatsBroker(broker, with_real=True):
await broker.start()

os = await broker.object_storage("example-bucket")
try:
existed_files = await os.list()
except Exception:
existed_files = ()

call = True
for file in existed_files:
if file.name == "file.txt":
call = False

if call:
async with TestApp(app):
pass

async with (
TestNatsBroker(broker, with_real=True, connect_only=True),
TestApp(app),
):
await handler.wait_call(3.0)
handler.mock.assert_called_once_with("file.txt")

0 comments on commit e23eccc

Please sign in to comment.