Fix tests
This commit is contained in:
parent
eba0aa649d
commit
c82232166d
@ -14,7 +14,7 @@ def get_rounds_for_ttl_seconds(seconds: int, size_bytes: int):
|
||||
class TestAnonVDF(unittest.TestCase):
|
||||
|
||||
def test_vdf_create(self):
|
||||
ttl = 1200
|
||||
ttl = 10000
|
||||
test_data = kasten.generator.pack.pack(b"test", "tst", app_metadata={"ttl": ttl})
|
||||
test_vdf = mimcvdf.vdf_create(test_data, get_rounds_for_ttl_seconds(ttl, len(test_data)), dec=True)
|
||||
|
||||
|
@ -9,7 +9,7 @@ from math import floor
|
||||
class TestUniversalRules(unittest.TestCase):
|
||||
|
||||
def test_block_is_sane_max_size(self):
|
||||
packed = kasten.generator.pack.pack(b"1"*6000000, b"tst", 0)
|
||||
packed = kasten.generator.pack.pack(b"1"*1000000000, b"tst", 0)
|
||||
self.assertRaises(
|
||||
universalrules.BlockTooLarge,
|
||||
universalrules.check_block_sanity, packed)
|
||||
@ -43,10 +43,10 @@ class TestUniversalRules(unittest.TestCase):
|
||||
t = floor(time()) - 6
|
||||
bls = []
|
||||
for i in range(3):
|
||||
packed = kasten.generator.pack.pack(b"1"*2*i, b"tst", timestamp=t, app_metadata={"ttl": 60})
|
||||
k = anonvdf.AnonVDFGenerator.generate(packed, 60)
|
||||
packed = kasten.generator.pack.pack(b"1"*2*i, b"tst", timestamp=t, app_metadata={"ttl": 10000})
|
||||
k = anonvdf.AnonVDFGenerator.generate(packed, 10000)
|
||||
bls.append(k.id)
|
||||
packed = kasten.generator.pack.pack(b"1"*2*1, b"tst", timestamp=t, app_metadata={"ttl": 60})
|
||||
packed = kasten.generator.pack.pack(b"1"*2*1, b"tst", timestamp=t, app_metadata={"ttl": 10000})
|
||||
k = anonvdf.AnonVDFGenerator.generate(packed, 1000)
|
||||
self.assertRaises(universalrules.BlockExistsError, universalrules.checksum_exists_in_list, k.id, bls)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user