diff options
author | Monty Taylor <mordred@inaugust.com> | 2013-06-30 23:19:32 -0400 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2013-06-30 23:33:07 -0400 |
commit | bd0880cc940a3dde2ac9b09d67591982a548d466 (patch) | |
tree | d660fa711653c5fda912df3c68daf821eb887f4a | |
parent | d8a537c7fe9b1e455831d05d9ba0ab67e03fb3a5 (diff) | |
download | python-glanceclient-bd0880cc940a3dde2ac9b09d67591982a548d466.tar.gz |
Rename invalid domain name to be RFC compliant.
http://tools.ietf.org/html/rfc6761 and
http://tools.ietf.org/html/rfc2606 define invalid domain names to
be used in contexts such as this. It's good to be compliant with RFCs.
Change-Id: Ibb7f9ee12c0c4331f8a33470def74c3a136ef6d9
-rw-r--r-- | tests/v1/test_legacy_shell.py | 34 | ||||
-rw-r--r-- | tests/v1/test_shell.py | 2 | ||||
-rw-r--r-- | tests/v2/test_shell_v2.py | 8 |
3 files changed, 22 insertions, 22 deletions
diff --git a/tests/v1/test_legacy_shell.py b/tests/v1/test_legacy_shell.py index 8d037ac..8d72046 100644 --- a/tests/v1/test_legacy_shell.py +++ b/tests/v1/test_legacy_shell.py @@ -27,7 +27,7 @@ class LegacyShellV1Test(testtools.TestCase): def test_print_image_formatted(self): class FakeClient(): - endpoint = 'http://no.where' + endpoint = 'http://is.invalid' class FakeImage(): id = 1 @@ -62,7 +62,7 @@ class LegacyShellV1Test(testtools.TestCase): updated_at = '04.03.2013' deleted_at = '04.03.2013' - gc = client.Client('1', 'http://no.where:8080') + gc = client.Client('1', 'http://is.invalid:8080') test_shell.print_image_formatted(gc, FakeImage()) def test_get_image_fields_from_args(self): @@ -87,7 +87,7 @@ class LegacyShellV1Test(testtools.TestCase): def test_do_add_error(self): class FakeClient(): - endpoint = 'http://no.where' + endpoint = 'http://is.invalid' class args: fields = 'name' @@ -96,7 +96,7 @@ class LegacyShellV1Test(testtools.TestCase): self.assertEqual(1, actual) def test_do_add(self): - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') class FakeImage(): fields = ['name=test', @@ -114,7 +114,7 @@ class LegacyShellV1Test(testtools.TestCase): self.assertEqual(0, actual) def test_do_add_with_image_meta(self): - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') class FakeImage(): fields = ['name=test', @@ -136,7 +136,7 @@ class LegacyShellV1Test(testtools.TestCase): self.assertEqual(0, actual) def test_do_add_without_dry_run(self): - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') class FakeImage(): fields = ['name=test', @@ -237,7 +237,7 @@ class LegacyShellV1Test(testtools.TestCase): def test_do_update_error(self): class FakeClient(): - endpoint = 'http://no.where' + endpoint = 'http://is.invalid' class Image(): fields = ['id', 'is_public', 'name'] @@ -254,7 +254,7 @@ class LegacyShellV1Test(testtools.TestCase): id = 'test' args = Image() - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') self.assertRaises( exc.InvalidEndpoint, test_shell.do_update, gc, args) @@ -269,7 +269,7 @@ class LegacyShellV1Test(testtools.TestCase): id = 'test' args = Image() - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') actual = test_shell.do_update(gc, args) self.assertEqual(0, actual) @@ -294,7 +294,7 @@ class LegacyShellV1Test(testtools.TestCase): created_at = '12.09.2013' args = Image() - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') with mock.patch.object(gc.images, 'update') as mocked_update: mocked_update.return_value = Image() actual = test_shell.do_update(gc, args) @@ -351,7 +351,7 @@ class LegacyShellV1Test(testtools.TestCase): owner = 'test' updated_at = '04.03.2013' - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') with mock.patch.object(gc.images, 'get') as mocked_get: mocked_get.return_value = Image() actual = test_shell.do_show(gc, Image()) @@ -372,7 +372,7 @@ class LegacyShellV1Test(testtools.TestCase): size = 1024 args = Image() - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') with mock.patch.object(gc.images, 'list') as mocked_list: mocked_list.return_value = [Image(), Image()] actual = test_shell.do_index(gc, args) @@ -392,7 +392,7 @@ class LegacyShellV1Test(testtools.TestCase): size = 1024 args = Image() - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') with mock.patch.object(test_shell, '_get_images') as mocked_get: mocked_get.return_value = False actual = test_shell.do_index(gc, args) @@ -420,7 +420,7 @@ class LegacyShellV1Test(testtools.TestCase): created_at = '12.12.12' args = Image() - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') with mock.patch.object(gc.images, 'list') as mocked_list: mocked_list.return_value = [Image(), Image()] actual = test_shell.do_details(gc, args) @@ -498,7 +498,7 @@ class LegacyShellV1Test(testtools.TestCase): def __init__(self): self.member_id = 'test' - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') with mock.patch.object(gc.image_members, 'list') as mocked_list: mocked_list.return_value = [] actual = test_shell.do_member_images(gc, FakeImage1()) @@ -529,7 +529,7 @@ class LegacyShellV1Test(testtools.TestCase): self.image_id = 'fake_id' self.member_id = 'test' - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') actual = test_shell.do_members_replace(gc, Fake()) def test_do_members_replace_dry_run_false(self): @@ -540,7 +540,7 @@ class LegacyShellV1Test(testtools.TestCase): self.image_id = 'fake_id' self.member_id = 'test' - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') with mock.patch.object(gc.image_members, 'list') as mocked_list: mocked_list.return_value = [] diff --git a/tests/v1/test_shell.py b/tests/v1/test_shell.py index 88ad3e3..3e11740 100644 --- a/tests/v1/test_shell.py +++ b/tests/v1/test_shell.py @@ -199,7 +199,7 @@ class ShellInvalidEndpointTest(utils.TestCase): 'OS_AUTH_TOKEN': 'pass', 'OS_IMAGE_API_VERSION': '1', 'OS_REGION_NAME': 'test', - 'OS_IMAGE_URL': 'http://no.where'} + 'OS_IMAGE_URL': 'http://is.invalid'} self.shell = shell.OpenStackImagesShell() diff --git a/tests/v2/test_shell_v2.py b/tests/v2/test_shell_v2.py index 1f3cc0b..d33b86f 100644 --- a/tests/v2/test_shell_v2.py +++ b/tests/v2/test_shell_v2.py @@ -25,7 +25,7 @@ from glanceclient.v2 import shell as test_shell class LegacyShellV1Test(testtools.TestCase): def test_do_image_list(self): - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') class Fake(): def __init__(self): @@ -39,7 +39,7 @@ class LegacyShellV1Test(testtools.TestCase): actual = test_shell.do_image_list(gc, Fake()) def test_do_image_show(self): - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') class Fake(): def __init__(self): @@ -70,7 +70,7 @@ class LegacyShellV1Test(testtools.TestCase): id = 'pass' file = 'test' - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') with mock.patch.object(gc.images, 'data') as mocked_data: mocked_data.return_value = 'test_passed' test_shell.do_image_download(gc, Fake()) @@ -80,7 +80,7 @@ class LegacyShellV1Test(testtools.TestCase): id = 'pass' file = 'test' - gc = client.Client('1', 'http://no.where') + gc = client.Client('1', 'http://is.invalid') with mock.patch.object(gc.images, 'delete') as mocked_delete: mocked_delete.return_value = 0 test_shell.do_image_delete(gc, Fake()) |