Update pow check approach in test_object using proofofwork.Worker

This commit is contained in:
Lee Miller 2023-10-05 15:07:03 +03:00
parent df34857d6a
commit 904a554631
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63
1 changed files with 1 additions and 2 deletions

View File

@ -122,8 +122,7 @@ class TestStructure(unittest.TestCase):
obj = structure.Object(
b'\x00' * 8, int(time.time() + 300), 42, 1, 2, b'HELLO')
vector = obj.vector
proofofwork._worker(obj) # pylint: disable=protected-access
obj = shared.objects.popitem()[1]
obj = proofofwork.Worker().add_pow(obj)
self.assertNotEqual(obj.vector, vector)
self.assertFalse(obj.is_expired())
self.assertFalse(obj.is_valid())