'Assert the WMI object integrity, i.e. contains the given properties.'

def assertWMIObject(self, wmi_obj, properties):

    for prop_and_value in properties:
        prop = (prop_and_value[0] if isinstance(prop_and_value, tuple) else prop_and_value)
        value = (prop_and_value[1] if isinstance(prop_and_value, tuple) else None)
        self.assertIn(prop, wmi_obj)
        if (value is None):
            continue
        self.assertEquals(wmi_obj[prop], value)
