from app.core.storage import download_object, ensure_bucket, memory_store, upload_object


def test_ensure_bucket_noop_in_memory():
    ensure_bucket()


def test_memory_storage_roundtrip():
    memory_store.clear()
    upload_object("avatars/test.png", b"abc", "image/png")
    payload = download_object("avatars/test.png")
    assert payload == (b"abc", "image/png")
    assert download_object("missing") is None

