Correct addCleanup reference

Some test_storage.py classes contain calls to cleanup methods
instead of references. This commit fixes that.

Signed-off-by: Fon E. Noel NFEBE <fenn25.fn@gmail.com>
This commit is contained in:
Fon E. Noel NFEBE 2022-11-30 16:53:20 +01:00
parent 6b0fa64236
commit b193ad3ed4

View File

@ -563,7 +563,7 @@ class Server(AsyncTestCase):
self.sparent = LoggingServiceParent() self.sparent = LoggingServiceParent()
self.sparent.startService() self.sparent.startService()
self._lease_secret = itertools.count() self._lease_secret = itertools.count()
self.addCleanup(self.sparent.stopService()) self.addCleanup(self.sparent.stopService)
def workdir(self, name): def workdir(self, name):
basedir = os.path.join("storage", "Server", name) basedir = os.path.join("storage", "Server", name)
@ -1284,7 +1284,7 @@ class MutableServer(SyncTestCase):
super(MutableServer, self).setUp() super(MutableServer, self).setUp()
self.sparent = LoggingServiceParent() self.sparent = LoggingServiceParent()
self._lease_secret = itertools.count() self._lease_secret = itertools.count()
self.addCleanup(self.sparent.stopService()) self.addCleanup(self.sparent.stopService)
def workdir(self, name): def workdir(self, name):
basedir = os.path.join("storage", "MutableServer", name) basedir = os.path.join("storage", "MutableServer", name)
@ -3337,7 +3337,7 @@ class Stats(SyncTestCase):
super(Stats, self).setUp() super(Stats, self).setUp()
self.sparent = LoggingServiceParent() self.sparent = LoggingServiceParent()
self._lease_secret = itertools.count() self._lease_secret = itertools.count()
self.addCleanup(self.sparent.stopService()) self.addCleanup(self.sparent.stopService)
def workdir(self, name): def workdir(self, name):
basedir = os.path.join("storage", "Server", name) basedir = os.path.join("storage", "Server", name)