Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(999)

Unified Diff: third_party/boto/tests/unit/glacier/test_layer2.py

Issue 698893003: Update checked in version of gsutil to version 4.6 (Closed) Base URL: http://dart.googlecode.com/svn/third_party/gsutil/
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/boto/tests/unit/glacier/test_layer2.py
===================================================================
--- third_party/boto/tests/unit/glacier/test_layer2.py (revision 33376)
+++ third_party/boto/tests/unit/glacier/test_layer2.py (working copy)
@@ -33,7 +33,7 @@
from StringIO import StringIO
-from datetime import datetime
+from datetime import datetime, tzinfo, timedelta
# Some fixture data from the Glacier docs
FIXTURE_VAULT = {
@@ -211,16 +211,28 @@
"archive")
def test_initiate_job(self):
+ class UTC(tzinfo):
+ """UTC"""
+
+ def utcoffset(self, dt):
+ return timedelta(0)
+
+ def tzname(self, dt):
+ return "Z"
+
+ def dst(self, dt):
+ return timedelta(0)
+
self.mock_layer1.initiate_job.return_value = {'JobId': 'job-id'}
- self.vault.retrieve_inventory(start_date=datetime(2014, 01, 01),
- end_date=datetime(2014, 01, 02),
+ self.vault.retrieve_inventory(start_date=datetime(2014, 01, 01, tzinfo=UTC()),
+ end_date=datetime(2014, 01, 02, tzinfo=UTC()),
limit=100)
self.mock_layer1.initiate_job.assert_called_with(
'examplevault', {
'Type': 'inventory-retrieval',
'InventoryRetrievalParameters': {
- 'StartDate': '2014-01-01T00:00:00',
- 'EndDate': '2014-01-02T00:00:00',
+ 'StartDate': '2014-01-01T00:00:00Z',
+ 'EndDate': '2014-01-02T00:00:00Z',
'Limit': 100
}
})
« no previous file with comments | « third_party/boto/tests/unit/glacier/test_concurrent.py ('k') | third_party/boto/tests/unit/iam/test_connection.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698