def is_compliant(self, path):
        """
        Given a set of content matching cases i.e. tuple(regex, bool) where
        bool value denotes whether or not regex is expected to match, check that
        all cases match as expected with the contents of the file. Cases can be
        expected to pass of fail.

        :param path: Path of file to check.
        :returns: Boolean value representing whether or not all cases are
                  found to be compliant.
        """
        log("Auditing contents of file '%s'" % (path), level=DEBUG)
        with open(path, 'r') as fd:
            contents = fd.read()

        matches = 0
        for pattern in self.pass_cases:
            key = re.compile(pattern, flags=re.MULTILINE)
            results = re.search(key, contents)
            if results:
                matches += 1
            else:
                log("Pattern '%s' was expected to pass but instead it failed"
                    % (pattern), level=WARNING)

        for pattern in self.fail_cases:
            key = re.compile(pattern, flags=re.MULTILINE)
            results = re.search(key, contents)
            if not results:
                matches += 1
            else:
                log("Pattern '%s' was expected to fail but instead it passed"
                    % (pattern), level=WARNING)

        total = len(self.pass_cases) + len(self.fail_cases)
        log("Checked %s cases and %s passed" % (total, matches), level=DEBUG)
        return matches == total