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_connection_not_in_storage():
loop = asyncio.new_event_loop()
c = aioftp.Connection(loop=loop)
with pytest.raises(AttributeError):
getattr(c, "foo")
def test_connection_del_future():
loop = asyncio.new_event_loop()
c = aioftp.Connection(loop=loop)
c.foo = "bar"
del c.future.foo
def test_connection_not_in_storage():
loop = asyncio.new_event_loop()
c = aioftp.Connection(loop=loop)
getattr(c, "foo")
def test_connection_del_future():
loop = asyncio.new_event_loop()
c = aioftp.Connection(loop=loop)
c.foo = "bar"
del c.future.foo