Fix removes date_time items from dictionaries
Some functional tests fail because they assert dictionaries with date/time items. For example, test_environment_template_create checks that dictionary env_template exists in env_template_list dicrionary list. All mentioned dictionaries have date/time items with keys 'Created' and 'Updated'. If the system, where functional tests are executed will be quite slow - time in these dictionaries could differ. This behavior will result corresponding test to fail even if all tasks will be executed successfully because time in dictionaries for 'Created' and 'Updated' keys will differ and assert will fail Removing the date/time items from dictionaries will help to successfully pass functional tests Closes-Bug: #1626733 Change-Id: I859eb7024619c8718411e295fe7cb93c6b8972eb
This commit is contained in:
parent
a7bb91a77c
commit
5260570c95
|
@ -372,6 +372,12 @@ class EnvTemplateMuranoSanityClientTest(utils.CLIUtilsTestBase):
|
|||
'TestMuranoSanityEnvTemp')
|
||||
env_template_list = self.listing('env-template-list')
|
||||
|
||||
# Deleting dates from dictionaries to skip it in assert
|
||||
map(lambda x: x.pop('Updated', None),
|
||||
env_template_list + [env_template])
|
||||
map(lambda x: x.pop('Created', None),
|
||||
env_template_list + [env_template])
|
||||
|
||||
self.assertIn(env_template, env_template_list)
|
||||
|
||||
def test_environment_template_delete(self):
|
||||
|
|
Loading…
Reference in New Issue