From: Daira Hopwood Date: Tue, 28 Apr 2015 16:02:43 +0000 (+0100) Subject: Cosmetics. X-Git-Url: https://git.rkrishnan.org/something?a=commitdiff_plain;h=f13cca42b5f4ba997199faad6dbfbb5bc1adfb1b;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 439f33ce..a8ee7b97 100644 --- a/src/allmydata/test/test_drop_upload.py +++ b/src/allmydata/test/test_drop_upload.py @@ -71,8 +71,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) @@ -87,8 +87,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") @@ -183,7 +183,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.