mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-01 23:30:53 +00:00
27 lines
632 B
Python
27 lines
632 B
Python
|
|
|
|
from allmydata.testing.web import (
|
|
create_fake_tahoe_root,
|
|
deterministic_key_generator,
|
|
)
|
|
|
|
import pytest
|
|
import pytest_twisted
|
|
|
|
|
|
@pytest_twisted.inlineCallbacks
|
|
def test_retrieve_cap():
|
|
"""
|
|
WebUI Fake can serve a read-capability back
|
|
"""
|
|
|
|
keys = deterministic_key_generator()
|
|
root = yield create_fake_tahoe_root()
|
|
dummy_readcap = yield root.add_data(
|
|
next(keys),
|
|
"some dummy content\n"*20
|
|
)
|
|
print("readcap: {}".format(dummy_readcap))
|
|
|
|
assert dummy_readcap.to_string() == "URI:CHK:ifaucqkbifaucqkbifaucqkbie:qg3n5r4q36wvwt33fobghsyqacc5ymnadk7wf6hafamsh6amybza:1:1:380"
|