Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_permission_is_parent():
p = aioftp.Permission("/foo/bar")
assert p.is_parent(pathlib.PurePosixPath("/foo/bar/baz"))
assert not p.is_parent(pathlib.PurePosixPath("/bar/baz"))
def test_reprs_works():
repr(aioftp.Throttle())
repr(aioftp.Permission())
repr(aioftp.User())
def test_permission_representation():
p = aioftp.Permission(writable=False)
nose.tools.eq_(
repr(p),
"Permission(PurePosixPath('/'), readable=True, writable=False)"
)