ServerGroupsV213SampleJsonTest should actually test v2.13

This API samples test was not using testscenarios properly,
and it wasn't extending the correct test class, so it was:

1. Not actually running tests.
2. Not running tests at the correct microversion (v2.13).

This fixes the testscenarios setup for the subclass and the
API samples and templates (since it's not using subs for the
intended project_id that was in the samples).

Also fixes a typo in ApiSampleTestBaseV21.

Change-Id: I27e8fce5d456914d88098c6cfabe05fa8afbc8eb
Closes-Bug: #1534354
This commit is contained in:
Matt Riedemann 2016-01-14 14:48:40 -08:00
parent d3b6602501
commit 0875a411aa
8 changed files with 11 additions and 11 deletions

View File

@ -5,7 +5,7 @@
"policies": ["anti-affinity"],
"members": [],
"metadata": {},
"project_id": "c7c9f4f175e247acb56c108fd724d667",
"project_id": "openstack",
"user_id": "fake"
}
}

View File

@ -6,7 +6,7 @@
"policies": ["anti-affinity"],
"members": [],
"metadata": {},
"project_id": "c7c9f4f175e247acb56c108fd724d667",
"project_id": "openstack",
"user_id": "fake"
}
]

View File

@ -5,7 +5,7 @@
"policies": ["anti-affinity"],
"members": [],
"metadata": {},
"project_id": "c7c9f4f175e247acb56c108fd724d667",
"project_id": "openstack",
"user_id": "fake"
}
}

View File

@ -58,7 +58,7 @@ CONF = cfg.CONF
# microversions, then replace the ``scenarios`` class variable in that
# test class with something like:
#
# [("v2_11", {'api_major_version': 'v2.1', 'microversion', '2.11'})]
# [("v2_11", {'api_major_version': 'v2.1', 'microversion': '2.11'})]
class ApiSampleTestBaseV21(testscenarios.WithScenarios,

View File

@ -5,7 +5,7 @@
"policies": ["anti-affinity"],
"members": [],
"metadata": {},
"project_id": "c7c9f4f175e247acb56c108fd724d667",
"project_id": "openstack",
"user_id": "fake"
}
}

View File

@ -6,7 +6,7 @@
"policies": ["anti-affinity"],
"members": [],
"metadata": {},
"project_id": "c7c9f4f175e247acb56c108fd724d667",
"project_id": "openstack",
"user_id": "fake"
}
]

View File

@ -5,7 +5,7 @@
"policies": ["anti-affinity"],
"members": [],
"metadata": {},
"project_id": "c7c9f4f175e247acb56c108fd724d667",
"project_id": "openstack",
"user_id": "fake"
}
}

View File

@ -78,7 +78,7 @@ class ServerGroupsSampleJsonTest(api_sample_base.ApiSampleTestBaseV21):
self.assertEqual(204, response.status_code)
class ServerGroupsV213SampleJsonTest(api_sample_base.ApiSampleTestBaseV21):
extension_name = "os-server-groups"
request_api_version = '2.13'
scenarios = [('v2_13', {})]
class ServerGroupsV213SampleJsonTest(ServerGroupsSampleJsonTest):
scenarios = [
("v2_13", {'api_major_version': 'v2.1', 'microversion': '2.13'})
]