From: Daira Hopwood Date: Mon, 27 Apr 2015 22:20:22 +0000 (+0100) Subject: Move initialization to setUp(). X-Git-Url: https://git.rkrishnan.org/?a=commitdiff_plain;h=0e3a3ef3a8cc3422d4ad6f1cbcd66a4588377a53;p=tahoe-lafs%2Ftahoe-lafs.git Move initialization to setUp(). Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/test/test_drop_upload.py b/src/allmydata/test/test_drop_upload.py index c89751d6..a4ee7e71 100644 --- a/src/allmydata/test/test_drop_upload.py +++ b/src/allmydata/test/test_drop_upload.py @@ -25,6 +25,11 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA with the real INotify. """ + def setUp(self): + GridTestMixin.setUp(self) + self.uploader = None + self.dir_node = None + def _get_count(self, name): return self.stats_provider.get_stats()["counters"].get(name, 0) @@ -99,7 +104,6 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA self.failIfEqual(was_uploaded, False) def _test_uploader_start_service(self): - self.uploader = None self.set_up_grid() self.client = self.g.clients[0] self.stats_provider = self.client.stats_provider @@ -114,8 +118,6 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA def _test_move_tree(self): print "_test_move_tree" - self.uploader = None - self.dir_node = None self.set_up_grid() self.local_dir = os.path.join(self.basedir, u"l\u00F8cal_dir") @@ -172,8 +174,6 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA a second time. This test is meant to test the database persistence along with the startup and shutdown code paths of the uploader. """ - self.uploader = None - self.dir_node = None self.set_up_grid() self.local_dir = os.path.join(self.basedir, u"test_persistence") self.mkdir_nonascii(self.local_dir) @@ -211,8 +211,6 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA return d def _test(self): - self.uploader = None - self.dir_node = None self.set_up_grid() self.local_dir = os.path.join(self.basedir, self.unicode_or_fallback(u"loc\u0101l_dir", u"local_dir")) self.mkdir_nonascii(self.local_dir)