Merge "Fixed test_shell which can't test microversions>=2.4"

This commit is contained in:
Jenkins 2016-01-04 15:27:35 +00:00 committed by Gerrit Code Review
commit 6bc5b3ef2a
2 changed files with 9 additions and 4 deletions

View File

@ -22,6 +22,7 @@ import re
import six
from six.moves.urllib import parse
import novaclient
from novaclient import client as base_client
from novaclient import exceptions
from novaclient.tests.unit import fakes
@ -155,8 +156,8 @@ class FakeHTTPClient(base_client.HTTPClient):
{"status": "CURRENT", "updated": "2013-07-23T11:33:21Z",
"links": [{"href": "http://nova-api:8774/v2.1/",
"rel": "self"}],
"min_version": "2.1",
"version": "2.3",
"min_version": novaclient.API_MIN_VERSION.get_string(),
"version": novaclient.API_MAX_VERSION.get_string(),
"id": "v2.1"}
]})
@ -182,8 +183,8 @@ class FakeHTTPClient(base_client.HTTPClient):
"href": "http://nova-api:8774/v2.1/",
"rel": "self"
}],
"min_version": "2.1",
"version": "2.3",
"min_version": novaclient.API_MIN_VERSION.get_string(),
"version": novaclient.API_MAX_VERSION.get_string(),
"id": "v2.1"
}
}

View File

@ -2618,6 +2618,10 @@ class ShellTest(utils.TestCase):
'excluding them.' % sorted(unaccounted_for))
self.assertEqual(set([]), unaccounted_for, failure_msg)
def test_list_v2_10(self):
self.run_command('list', api_version='2.10')
self.assert_called('GET', '/servers/detail')
class ShellWithSessionClientTest(ShellTest):