No need to check for None in reflector test tear down
This commit is contained in:
parent
ae74d80c8a
commit
4971ddda78
1 changed files with 8 additions and 16 deletions
|
@ -162,24 +162,16 @@ class TestReflector(unittest.TestCase):
|
||||||
def take_down_env(self):
|
def take_down_env(self):
|
||||||
d = defer.succeed(True)
|
d = defer.succeed(True)
|
||||||
## Close client classes ##
|
## Close client classes ##
|
||||||
if self.lbry_file_manager is not None:
|
|
||||||
d.addCallback(lambda _: self.lbry_file_manager.stop())
|
d.addCallback(lambda _: self.lbry_file_manager.stop())
|
||||||
if self.session is not None:
|
|
||||||
d.addCallback(lambda _: self.session.shut_down())
|
d.addCallback(lambda _: self.session.shut_down())
|
||||||
if self.stream_info_manager is not None:
|
|
||||||
d.addCallback(lambda _: self.stream_info_manager.stop())
|
d.addCallback(lambda _: self.stream_info_manager.stop())
|
||||||
|
|
||||||
## Close server classes ##
|
## Close server classes ##
|
||||||
if self.server_blob_manager is not None:
|
|
||||||
d.addCallback(lambda _: self.server_blob_manager.stop())
|
d.addCallback(lambda _: self.server_blob_manager.stop())
|
||||||
if self.server_lbry_file_manager is not None:
|
|
||||||
d.addCallback(lambda _: self.server_lbry_file_manager.stop())
|
d.addCallback(lambda _: self.server_lbry_file_manager.stop())
|
||||||
if self.server_session is not None:
|
|
||||||
d.addCallback(lambda _: self.server_session.shut_down())
|
d.addCallback(lambda _: self.server_session.shut_down())
|
||||||
if self.server_stream_info_manager is not None:
|
|
||||||
d.addCallback(lambda _: self.server_stream_info_manager.stop())
|
d.addCallback(lambda _: self.server_stream_info_manager.stop())
|
||||||
|
|
||||||
if self.reflector_port is not None:
|
|
||||||
d.addCallback(lambda _: self.reflector_port.stopListening())
|
d.addCallback(lambda _: self.reflector_port.stopListening())
|
||||||
|
|
||||||
def delete_test_env():
|
def delete_test_env():
|
||||||
|
|
Loading…
Reference in a new issue