From: david-sarah Date: Wed, 10 Aug 2011 05:25:04 +0000 (-0700) Subject: test_client.py: relax a check in test_create_drop_uploader so that it should pass... X-Git-Url: https://git.rkrishnan.org/pf/content/en/frontends/flags?a=commitdiff_plain;h=ab9eb12f7006322fc7c1a973b15bce98c7c548da;p=tahoe-lafs%2Ftahoe-lafs.git test_client.py: relax a check in test_create_drop_uploader so that it should pass on Python 2.4.x. refs #1429 --- diff --git a/src/allmydata/test/test_client.py b/src/allmydata/test/test_client.py index 59618fd5..26af5118 100644 --- a/src/allmydata/test/test_client.py +++ b/src/allmydata/test/test_client.py @@ -209,7 +209,7 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase): class Boom(Exception): pass - mock_drop_uploader.side_effect = Boom("something wrong") + mock_drop_uploader.side_effect = Boom() basedir2 = "test_client.Basic.test_create_drop_uploader2" os.mkdir(basedir2) @@ -219,7 +219,7 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase): "enabled = true\n") c2 = client.Client(basedir2) self.failUnlessRaises(KeyError, c2.getServiceNamed, 'drop-upload') - self.failIf([True for arg in mock_log_msg.call_args_list if "Boom" in repr(arg) or "something wrong" in repr(arg)], + self.failIf([True for arg in mock_log_msg.call_args_list if "Boom" in repr(arg)], mock_log_msg.call_args_list) self.failUnless([True for arg in mock_log_msg.call_args_list if "upload.dircap or local.directory not specified" in repr(arg)], mock_log_msg.call_args_list) @@ -228,7 +228,7 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase): os.mkdir(basedir3) fileutil.write(os.path.join(basedir3, "tahoe.cfg"), config) client.Client(basedir3) - self.failUnless([True for arg in mock_log_msg.call_args_list if "Boom" in repr(arg) and "something wrong" in repr(arg)], + self.failUnless([True for arg in mock_log_msg.call_args_list if "Boom" in repr(arg)], mock_log_msg.call_args_list)