]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Renamings (snake_case instead of camelCase; follow naming conventions). 2406.otf-objective-2.3.1-fix-upload-deque
authorDaira Hopwood <daira@jacaranda.org>
Tue, 28 Apr 2015 16:04:29 +0000 (17:04 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Tue, 28 Apr 2015 16:13:24 +0000 (17:13 +0100)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/test/test_drop_upload.py

index ade1281ed1baf6fc5888c8ab91412778aaaca818..0b4ae478c7f6e13e52262fd54a3e7e7db6912845 100644 (file)
@@ -138,20 +138,20 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA
 
         d.addCallback(self._create_uploader)
 
-        def testMoveEmptyTree(res):
+        def _check_move_empty_tree(res):
             self.mkdir_nonascii(empty_tree_dir)
             d2 = defer.Deferred()
             self.uploader.set_uploaded_callback(d2.callback, ignore_count=0)
             os.rename(empty_tree_dir, new_empty_tree_dir)
             self.notify_close_write(to_filepath(new_empty_tree_dir))
             return d2
-        d.addCallback(testMoveEmptyTree)
+        d.addCallback(_check_move_empty_tree)
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.objects_uploaded'), 1))
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.files_uploaded'), 0))
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.objects_queued'), 0))
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.directories_created'), 1))
 
-        def testMoveSmallTree(res):
+        def _check_move_small_tree(res):
             self.mkdir_nonascii(small_tree_dir)
             fileutil.write(abspath_expanduser_unicode(u"what", base=small_tree_dir), "say when")
             d2 = defer.Deferred()
@@ -159,19 +159,19 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA
             os.rename(small_tree_dir, new_small_tree_dir)
             self.notify_close_write(to_filepath(new_small_tree_dir))
             return d2
-        d.addCallback(testMoveSmallTree)
+        d.addCallback(_check_move_empty_tree)
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.objects_uploaded'), 3))
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.files_uploaded'), 1))
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.objects_queued'), 0))
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.directories_created'), 2))
 
-        def testMovedTreeIsWatched(res):
+        def _check_moved_tree_is_watched(res):
             d2 = defer.Deferred()
             self.uploader.set_uploaded_callback(d2.callback, ignore_count=0)
             fileutil.write(abspath_expanduser_unicode(u"another", base=new_small_tree_dir), "file")
             self.notify_close_write(to_filepath(abspath_expanduser_unicode(u"another", base=new_small_tree_dir)))
             return d2
-        d.addCallback(testMovedTreeIsWatched)
+        d.addCallback(_check_moved_tree_is_watched)
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.objects_uploaded'), 4))
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.files_uploaded'), 2))
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.objects_queued'), 0))
@@ -200,9 +200,9 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA
         def create_file(val):
             d2 = defer.Deferred()
             self.uploader.set_uploaded_callback(d2.callback)
-            myFile = abspath_expanduser_unicode(u"what", base=self.local_dir)
-            fileutil.write(myFile, "meow")
-            self.notify_close_write(to_filepath(myFile))
+            test_file = abspath_expanduser_unicode(u"what", base=self.local_dir)
+            fileutil.write(test_file, "meow")
+            self.notify_close_write(to_filepath(test_file))
             return d2
         d.addCallback(create_file)
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.objects_uploaded'), 1))