Commit 36a6fafa by rfkelly0

make DisconnectingFS a proper wrapper

parent a07d64a7
...@@ -43,8 +43,10 @@ class TestConnectionManagerFS(unittest.TestCase,FSTestCases,ThreadingTestCases): ...@@ -43,8 +43,10 @@ class TestConnectionManagerFS(unittest.TestCase,FSTestCases,ThreadingTestCases):
class DisconnectingFS(WrapFS): class DisconnectingFS(WrapFS):
"""FS subclass that raises lots of RemoteConnectionErrors.""" """FS subclass that raises lots of RemoteConnectionErrors."""
def __init__(self): def __init__(self,fs=None):
super(DisconnectingFS,self).__init__(TempFS()) if fs is None:
fs = TempFS()
super(DisconnectingFS,self).__init__(fs)
self._connected = random.choice([True,False]) self._connected = random.choice([True,False])
if not self._connected: if not self._connected:
raise RemoteConnectionError("") raise RemoteConnectionError("")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment