]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Fixed some tests
authorDavid Stainton <dstainton415@gmail.com>
Tue, 28 Apr 2015 08:08:07 +0000 (09:08 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Tue, 28 Apr 2015 18:50:15 +0000 (19:50 +0100)
src/allmydata/test/test_drop_upload.py

index fbea459513422401b82edd72ffc764d1fbaeb28c..46dad82c669555fbb29fbddc829fcaeead82271e 100644 (file)
@@ -92,20 +92,24 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA
         ##
         # 2nd test uses db.check_file instead of SQL query directly
         # to confirm the previous upload entry in the db.
-        relative_path = abspath_expanduser_unicode(u"myFile2", base=self.basedir)
+        path = abspath_expanduser_unicode(u"myFile2", base=self.basedir)
         fileutil.write(path, "meow\n")
         s = os.stat(path)
         size = s[stat.ST_SIZE]
         ctime = s[stat.ST_CTIME]
         mtime = s[stat.ST_MTIME]
         db.did_upload_file('URI:LIT:2', path, mtime, ctime, size)
-        r = db.check_file(relative_path)
+        r = db.check_file(path)
         was_uploaded = r.was_uploaded()
         self.failIfEqual(was_uploaded, False)
 
     def test_uploader_start_service(self):
         self.maybe_skip_test()
         self.set_up_grid()
+
+        self.local_dir = abspath_expanduser_unicode(u"l\u00F8cal_dir", base=self.basedir)
+        self.mkdir_nonascii(self.local_dir)
+
         self.client = self.g.clients[0]
         self.stats_provider = self.client.stats_provider
 
@@ -150,7 +154,7 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.directories_created'), 1))
 
         def testMoveSmallTree(res):
-            tree_name = 'small_tree'
+            tree_name = u'small_tree'
             tree_dir = abspath_expanduser_unicode(tree_name, base=self.basedir)
             os.mkdir(tree_dir)
             fileutil.write(abspath_expanduser_unicode(u"what", base=tree_dir), "say when")