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

Unified Diff: third_party/boto/tests/unit/ec2/test_volume.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
« no previous file with comments | « third_party/boto/tests/unit/ec2/test_snapshot.py ('k') | third_party/boto/tests/unit/ecs/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/boto/tests/unit/ec2/test_volume.py
===================================================================
--- third_party/boto/tests/unit/ec2/test_volume.py (revision 33376)
+++ third_party/boto/tests/unit/ec2/test_volume.py (working copy)
@@ -78,10 +78,11 @@
retval = volume.startElement("not tagSet or attachmentSet", None, None)
self.assertEqual(retval, None)
- def check_that_attribute_has_been_set(self, name, value, attribute):
+ def check_that_attribute_has_been_set(self, name, value, attribute, obj_value=None):
volume = Volume()
volume.endElement(name, value, None)
- self.assertEqual(getattr(volume, attribute), value)
+ expected_value = obj_value if obj_value is not None else value
+ self.assertEqual(getattr(volume, attribute), expected_value)
def test_endElement_sets_correct_attributes_with_values(self):
for arguments in [("volumeId", "some value", "id"),
@@ -90,8 +91,9 @@
("size", 5, "size"),
("snapshotId", 1, "snapshot_id"),
("availabilityZone", "some zone", "zone"),
- ("someName", "some value", "someName")]:
- self.check_that_attribute_has_been_set(arguments[0], arguments[1], arguments[2])
+ ("someName", "some value", "someName"),
+ ("encrypted", "true", "encrypted", True)]:
+ self.check_that_attribute_has_been_set(*arguments)
def test_endElement_with_name_status_and_empty_string_value_doesnt_set_status(self):
volume = Volume()
« no previous file with comments | « third_party/boto/tests/unit/ec2/test_snapshot.py ('k') | third_party/boto/tests/unit/ecs/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698