Skip to content

Commit

Permalink
Avoided DeprecationWarning in cim_obj tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <maiera@de.ibm.com>
  • Loading branch information
andy-maier committed Feb 21, 2018
1 parent 5f225a4 commit 9b84c0f
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions testsuite/test_cim_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -4227,6 +4227,20 @@ def test_all(self):
raise AssertionError("test not implemented")


# Special CIMInstance objects for testcases_CIMInstance_hash list:
with pytest.warns(DeprecationWarning):
_INST_HASH_A_1 = CIMInstance(
'CIM_Foo',
properties={'Cheepy': 'Birds'},
property_list=['Cheepy'],
)
_INST_HASH_A_2 = CIMInstance(
'CIM_Foo',
properties={'Cheepy': 'Birds'},
property_list=[],
)


testcases_CIMInstance_hash = [

# Each testcase tuple has these items:
Expand Down Expand Up @@ -4546,16 +4560,8 @@ def test_all(self):
(
"Different property lists (does not matter for hash and equality)",
dict(
obj1=CIMInstance(
'CIM_Foo',
properties={'Cheepy': 'Birds'},
property_list=['Cheepy'],
),
obj2=CIMInstance(
'CIM_Foo',
properties={'Cheepy': 'Birds'},
property_list=[],
),
obj1=_INST_HASH_A_1,
obj2=_INST_HASH_A_2,
exp_hash_equal=True,
),
None, None, True
Expand Down

0 comments on commit 9b84c0f

Please sign in to comment.