Fix token response mock
The unit tests mock tokens from keystoneauth. One of the responses being returned from a mocked keystoneauth method was returning a v2.0 token that didn't have the right expiration attribute of a v2.0 token. This was caught by keystoneauth 3.0.1, which underwent a significant refactor and added a bunch of new functionality for version discovery. Keystoneauth was expecting `expires` to be in the token but instead the mock was using `expires_at`, which isn't a valid v2.0 token attribute. Closes-Bug: 1706538 Change-Id: Iea77ef54585d0b3480369e9f5df629e3f46f7e3b
This commit is contained in:
@@ -74,7 +74,7 @@ class ShellTest(testtools.TestCase):
|
|||||||
v2_auth_response = json.dumps({
|
v2_auth_response = json.dumps({
|
||||||
"access": {
|
"access": {
|
||||||
"token": {
|
"token": {
|
||||||
"expires_at": "2020-01-01T00:00:10.000123Z",
|
"expires": "2020-01-01T00:00:10.000123Z",
|
||||||
"id": 'fakeToken',
|
"id": 'fakeToken',
|
||||||
"tenant": {
|
"tenant": {
|
||||||
"id": uuid.uuid4().hex
|
"id": uuid.uuid4().hex
|
||||||
|
Reference in New Issue
Block a user