'Format the filters with multiple properties per instance to a comprehensive WQL `WHERE` clause.'

def test_wql_multiquery_filtering(self):

    from checks.libs.wmi import sampler
    format_filter = sampler.WMISampler._format_filter
    no_filters = []
    filters = [{'Name': 'SomeName', 'Property1': 'foo'}, {'Name': 'OtherName', 'Property1': 'bar'}]
    self.assertEquals('', format_filter(no_filters))
    self.assertEquals("    WHERE    (    Property1    =    'bar'    AND    Name    =    'OtherName'    )    OR    (    Property1    =    'foo'    AND    Name    =    'SomeName'    )", format_filter(filters))
