Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved and converted more of test_cim_obj to py.test; Fixes in cim_obj
Details: - Converted all test classes for `__str__()` and `__repr__()` of CIM object classes to py.test. - Converted most test classes for `__init__()` of CIM object classes to py.test and for those, added tests for the position of init arguments, and improved the test cases. - Fixed a bug in cim_obj where setting the `qualifiers` attribute of `CIMProperty`, `CIMMethod` and `CIMParameter` did not ensure that the items in the input dictionary were converted to `CIMQualifier` objects. It now ensures that. Adjusted the test cases accordingly. Note that that conversion had already been done for `CIMClass` and `CIMInstance`. - Fixed a bug in cim_obj where the `DeprecationWarning` when setting the deprecated `value` attribute of `CIMParameter` was always issued even when the new value was `None` (which is the default value, so the warning was issued even when the `value` attribute was not used at all). Now, the warning is only issued when the new value is not `None`. Adjusted the test cases accordingly. - The getter method for the deprecated `value` attribute of `CIMParameter` also issued a `DeprecationWarning`. Removed that warning because issuing it in the setter method is sufficient (the setter method is also used when initializing an object). Adjusted the test cases accordingly. Signed-off-by: Andreas Maier <maiera@de.ibm.com>
- Loading branch information