mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 02:01:31 +00:00
create_client is async
This commit is contained in:
parent
14a66a54f0
commit
7632504373
@ -319,6 +319,7 @@ class Basic(testutil.ReallyEqualMixin, testutil.NonASCIIPathMixin, unittest.Test
|
||||
with self.assertRaises(NeedRootcapLookupScheme):
|
||||
yield client.create_client(basedir)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def _storage_dir_test(self, basedir, storage_path, expected_path):
|
||||
os.mkdir(basedir)
|
||||
cfg_path = os.path.join(basedir, "tahoe.cfg")
|
||||
@ -334,7 +335,7 @@ class Basic(testutil.ReallyEqualMixin, testutil.NonASCIIPathMixin, unittest.Test
|
||||
"storage_dir = %s\n" % (storage_path,),
|
||||
mode="ab",
|
||||
)
|
||||
c = client.create_client(basedir)
|
||||
c = yield client.create_client(basedir)
|
||||
self.assertEqual(
|
||||
c.getServiceNamed("storage").storedir,
|
||||
expected_path,
|
||||
@ -352,7 +353,7 @@ class Basic(testutil.ReallyEqualMixin, testutil.NonASCIIPathMixin, unittest.Test
|
||||
abspath_expanduser_unicode(basedir),
|
||||
u"storage",
|
||||
)
|
||||
self._storage_dir_test(
|
||||
return self._storage_dir_test(
|
||||
basedir,
|
||||
config_path,
|
||||
expected_path,
|
||||
@ -371,7 +372,7 @@ class Basic(testutil.ReallyEqualMixin, testutil.NonASCIIPathMixin, unittest.Test
|
||||
abspath_expanduser_unicode(basedir),
|
||||
u"myowndir",
|
||||
)
|
||||
self._storage_dir_test(
|
||||
return self._storage_dir_test(
|
||||
basedir,
|
||||
config_path,
|
||||
expected_path,
|
||||
@ -394,7 +395,7 @@ class Basic(testutil.ReallyEqualMixin, testutil.NonASCIIPathMixin, unittest.Test
|
||||
u"client.Basic.test_absolute_storage_dir_myowndir/" + base
|
||||
)
|
||||
config_path = expected_path.encode("utf-8")
|
||||
self._storage_dir_test(
|
||||
return self._storage_dir_test(
|
||||
basedir,
|
||||
config_path,
|
||||
expected_path,
|
||||
|
Loading…
x
Reference in New Issue
Block a user