Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def locked_lock():
return Lock(None, "resource_name", 1, True)
def test_lock(self):
lock_manager = Aioredlock()
lock = Lock(lock_manager, "potato", 1, 1.0)
assert lock.resource == "potato"
assert lock.id == 1
assert lock.valid is False