mirror of https://gitlab.com/bashrc2/epicyon
Simplify test
parent
e563562b20
commit
05e9c05836
4
tests.py
4
tests.py
|
@ -3803,12 +3803,12 @@ def testDatashards() -> None:
|
||||||
print('testDatashards')
|
print('testDatashards')
|
||||||
shipper = datashards.utils.store('memory://')
|
shipper = datashards.utils.store('memory://')
|
||||||
assert shipper
|
assert shipper
|
||||||
saveData = open('README.md', 'rb').read()
|
saveData = b'some data to be stored'
|
||||||
data_size = len(saveData)
|
data_size = len(saveData)
|
||||||
saveData = saveData + (b'\0' * (32768 - data_size))
|
saveData = saveData + (b'\0' * (32768 - data_size))
|
||||||
assert len(saveData) == 32768
|
assert len(saveData) == 32768
|
||||||
urn = shipper.put(saveData)
|
urn = shipper.put(saveData)
|
||||||
assert urn
|
assert urn == 'urn:sha256d:5JSThDD4-TdA24qygZPKtmVwbv1fErijAnF-u5EOLco='
|
||||||
loadData = shipper.get(urn)
|
loadData = shipper.get(urn)
|
||||||
assert loadData
|
assert loadData
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue