summaryrefslogtreecommitdiff
path: root/testing/tests/blobs/test_fs_backend.py
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-03-30 18:08:09 -0300
committerdrebs <drebs@leap.se>2017-04-04 18:27:40 +0200
commit414ecfbb95b067d8f72400af4da9ed686742efc3 (patch)
tree0bd768d3b4e46a16457d7f4855dc4aaae97a6692 /testing/tests/blobs/test_fs_backend.py
parent5202f9f850501aeec2289416147a49706e86be1f (diff)
[test] change assert for self.assertX
Diffstat (limited to 'testing/tests/blobs/test_fs_backend.py')
-rw-r--r--testing/tests/blobs/test_fs_backend.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/tests/blobs/test_fs_backend.py b/testing/tests/blobs/test_fs_backend.py
index a2a374c6..78878063 100644
--- a/testing/tests/blobs/test_fs_backend.py
+++ b/testing/tests/blobs/test_fs_backend.py
@@ -63,8 +63,8 @@ class FilesystemBackendTestCase(unittest.TestCase):
backend._get_path = Mock(return_value='path')
request = DummyRequest([''])
result = backend.write_blob('user', 'blob_id', request)
- assert result == "Blob already exists: blob_id"
- assert request.responseCode == 409
+ self.assertEquals(result, "Blob already exists: blob_id")
+ self.assertEquals(request.responseCode, 409)
@pytest.mark.usefixtures("method_tmpdir")
@mock.patch.object(os.path, 'isfile')
@@ -86,7 +86,7 @@ class FilesystemBackendTestCase(unittest.TestCase):
backend = _blobs.FilesystemBlobsBackend()
backend.path = '/somewhere/'
path = backend._get_path('user', 'blob_id')
- assert path == '/somewhere/user/b/blo/blob_i/blob_id'
+ self.assertEquals(path, '/somewhere/user/b/blo/blob_i/blob_id')
@pytest.mark.usefixtures("method_tmpdir")
@mock.patch('leap.soledad.server._blobs.os.walk')
@@ -94,4 +94,4 @@ class FilesystemBackendTestCase(unittest.TestCase):
backend, _ = _blobs.FilesystemBlobsBackend(self.tempdir), None
walk_mock.return_value = [(_, _, ['blob_0']), (_, _, ['blob_1'])]
result = json.loads(backend.list_blobs('user', DummyRequest([''])))
- assert result == ['blob_0', 'blob_1']
+ self.assertEquals(result, ['blob_0', 'blob_1'])