From a35073cb3d68003ee639e209b7cbdc2ca3832180 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Fri, 5 Aug 2016 18:26:18 -0400 Subject: [PATCH] test.common: allow test_repairer to be run independently Previously, this file importing "allmydata.immutable" but assuming that "allmydata.immutable.upload" was available, which only worked if some other file had imported upload.py . This didn't affect running the entire test suite (something imported upload.py before anything else needed it), but caused errors when running specific tests like test_repairer.py . --- src/allmydata/test/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allmydata/test/common.py b/src/allmydata/test/common.py index 58f41b965..1979023fe 100644 --- a/src/allmydata/test/common.py +++ b/src/allmydata/test/common.py @@ -20,7 +20,7 @@ from allmydata.util import hashutil, log from allmydata.util.assertutil import precondition from allmydata.util.consumer import download_to_data import allmydata.test.common_util as testutil -from allmydata import immutable +from allmydata.immutable.upload import Uploader TEST_RSA_KEY_SIZE = 522 @@ -424,7 +424,7 @@ class LoggingServiceParent(service.MultiService): return log.msg(*args, **kwargs) -TEST_DATA="\x02"*(immutable.upload.Uploader.URI_LIT_SIZE_THRESHOLD+1) +TEST_DATA="\x02"*(Uploader.URI_LIT_SIZE_THRESHOLD+1) class ShouldFailMixin: def shouldFail(self, expected_failure, which, substring,