yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #49876
[Bug 1573652] [NEW] Some v2 tests' checks are wrong
Public bug reported:
In ./glance/tests/functional/v2/test_images.py
Tests such as test_download_image_allowed_using_restricted_policy do
this:
expected_image = {
'status': 'queued',
'name': 'image-1',
'tags': [],
'visibility': 'private',
'self': '/v2/images/%s' % image_id,
'protected': False,
'file': '/v2/images/%s/file' % image_id,
'min_disk': 0,
'min_ram': 0,
'schema': '/v2/schemas/image',
}
for key, value in six.iteritems(expected_image):
self.assertEqual(value, value, key)
It looks like we're checking 'value' against 'value' which doesn't seem
right.
This possibly should be: self.assertEqual(value, image[key])
** Affects: glance
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1573652
Title:
Some v2 tests' checks are wrong
Status in Glance:
New
Bug description:
In ./glance/tests/functional/v2/test_images.py
Tests such as test_download_image_allowed_using_restricted_policy do
this:
expected_image = {
'status': 'queued',
'name': 'image-1',
'tags': [],
'visibility': 'private',
'self': '/v2/images/%s' % image_id,
'protected': False,
'file': '/v2/images/%s/file' % image_id,
'min_disk': 0,
'min_ram': 0,
'schema': '/v2/schemas/image',
}
for key, value in six.iteritems(expected_image):
self.assertEqual(value, value, key)
It looks like we're checking 'value' against 'value' which doesn't
seem right.
This possibly should be: self.assertEqual(value, image[key])
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1573652/+subscriptions
Follow ups