From: Daira Hopwood Date: Tue, 28 Apr 2015 16:02:43 +0000 (+0100) Subject: Cosmetics. X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/frontends/configuration.rst?a=commitdiff_plain;h=e894456b8a6c9a776280cdc8086fd3778d589e97;p=tahoe-lafs%2Ftahoe-lafs.git Cosmetics. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/test/test_drop_upload.py b/src/allmydata/test/test_drop_upload.py index 249b216c..bfee3b84 100644 --- a/src/allmydata/test/test_drop_upload.py +++ b/src/allmydata/test/test_drop_upload.py @@ -72,8 +72,8 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA self._createdb(dbfile) def test_db_persistence(self): - """Test that a file upload creates an entry in the database. - """ + """Test that a file upload creates an entry in the database.""" + fileutil.make_dirs(self.basedir) dbfile = abspath_expanduser_unicode(u"dbfile", base=self.basedir) db = self._createdb(dbfile) @@ -88,8 +88,8 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA (path,)) row = db.cursor.fetchone() self.failIfEqual(row, None) - ## - # 2nd test uses db.check_file instead of SQL query directly + + # Second test uses db.check_file instead of SQL query directly # to confirm the previous upload entry in the db. path = abspath_expanduser_unicode(u"myFile2", base=self.basedir) fileutil.write(path, "meow\n") @@ -184,7 +184,8 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA return d def test_persistence(self): - """ Perform an upload of a given file and then stop the client. + """ + Perform an upload of a given file and then stop the client. Start a new client and uploader... and verify that the file is NOT uploaded a second time. This test is meant to test the database persistence along with the startup and shutdown code paths of the uploader.