From afb5421ee717174b989bfed61333f2073b3f3f50 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Mon, 6 Jul 2015 15:33:33 +0100 Subject: Return a sensible value for DataSourceGCE.availability_zone. --- tests/unittests/test_datasource/test_gce.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/unittests/test_datasource') diff --git a/tests/unittests/test_datasource/test_gce.py b/tests/unittests/test_datasource/test_gce.py index 98b68f09..fa714070 100644 --- a/tests/unittests/test_datasource/test_gce.py +++ b/tests/unittests/test_datasource/test_gce.py @@ -159,3 +159,8 @@ class TestDataSourceGCE(test_helpers.HttprettyTestCase): self.ds.get_data() self.assertEqual([key_content], self.ds.get_public_ssh_keys()) + + def test_only_last_part_of_zone_used_for_availability_zone(self): + _set_mock_metadata() + self.ds.get_data() + self.assertEqual('bar', self.ds.availability_zone) -- cgit v1.2.3