summaryrefslogtreecommitdiff
path: root/tests/unit/test_service.py
diff options
context:
space:
mode:
authorTim Burke <tim.burke@gmail.com>2017-03-15 18:05:38 +0000
committerTim Burke <tim.burke@gmail.com>2017-07-11 17:04:49 -0700
commit638d7c789cf3ccab61bf6af6fcab6e6d79b9e0a4 (patch)
tree9574c7dbbbf4f7760e87a48970e5b1823a0ad0c7 /tests/unit/test_service.py
parentcde73c196d4f161b227fb924cd59cf02eaa33c03 (diff)
downloadpython-swiftclient-638d7c789cf3ccab61bf6af6fcab6e6d79b9e0a4.tar.gz
Buffer reads from disk
Otherwise, Python defaults to 8k reads which seems kinda terrible. Change-Id: I3160626e947083af487fd1c3cb0aa6a62646527b Closes-Bug: #1671621
Diffstat (limited to 'tests/unit/test_service.py')
-rw-r--r--tests/unit/test_service.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit/test_service.py b/tests/unit/test_service.py
index 6490b3f..54f0a11 100644
--- a/tests/unit/test_service.py
+++ b/tests/unit/test_service.py
@@ -1951,7 +1951,7 @@ class TestServiceDownload(_TestServiceBase):
'headers_receipt': 3
}
)
- mock_open.assert_called_once_with('test_o', 'wb')
+ mock_open.assert_called_once_with('test_o', 'wb', 65536)
written_content.write.assert_called_once_with(b'objcontent')
mock_conn.get_object.assert_called_once_with(
@@ -1995,7 +1995,7 @@ class TestServiceDownload(_TestServiceBase):
'headers_receipt': 3
}
)
- mock_open.assert_called_once_with('test_o', 'wb')
+ mock_open.assert_called_once_with('test_o', 'wb', 65536)
mock_utime.assert_called_once_with(
'test_o', (1454113727.682512, 1454113727.682512))
written_content.write.assert_called_once_with(b'objcontent')
@@ -2041,7 +2041,7 @@ class TestServiceDownload(_TestServiceBase):
'headers_receipt': 3
}
)
- mock_open.assert_called_once_with('test_o', 'wb')
+ mock_open.assert_called_once_with('test_o', 'wb', 65536)
self.assertEqual(0, len(mock_utime.mock_calls))
written_content.write.assert_called_once_with(b'objcontent')
@@ -2087,7 +2087,7 @@ class TestServiceDownload(_TestServiceBase):
'headers_receipt': 3
}
)
- mock_open.assert_called_once_with('test_o', 'wb')
+ mock_open.assert_called_once_with('test_o', 'wb', 65536)
self.assertEqual([], mock_utime.mock_calls)
written_content.write.assert_called_once_with(b'objcontent')