From 601ed3ed0ffb81d743201c3819d18f79cee850f5 Mon Sep 17 00:00:00 2001 From: drebs Date: Fri, 8 Dec 2017 22:41:59 -0200 Subject: [refactor] make get_tag() return a deferred --- tests/blobs/test_fs_backend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/blobs/test_fs_backend.py b/tests/blobs/test_fs_backend.py index 6c5665e8..816cba39 100644 --- a/tests/blobs/test_fs_backend.py +++ b/tests/blobs/test_fs_backend.py @@ -35,6 +35,7 @@ import pytest class FilesystemBackendTestCase(unittest.TestCase): @pytest.mark.usefixtures("method_tmpdir") + @defer.inlineCallbacks def test_get_tag(self): expected_tag = base64.urlsafe_b64encode('B' * 16) backend = _blobs.FilesystemBlobsBackend(blobs_path=self.tempdir) @@ -44,7 +45,7 @@ class FilesystemBackendTestCase(unittest.TestCase): with open(path, "w") as f: f.write('A' * 40 + 'B' * 16) # ...and get its tag - tag = backend.get_tag('user', 'blob_id') + tag = yield backend.get_tag('user', 'blob_id') self.assertEquals(expected_tag, tag) @pytest.mark.usefixtures("method_tmpdir") -- cgit v1.2.3