def METHOD_NAME(self, filename, pattern, should_match=True, fn=fnmatch):
    if should_match:
        self.assertTrue(fn(filename, pattern),
                     "expected %r to match pattern %r"
                     % (filename, pattern))
    else:
        self.assertFalse(fn(filename, pattern),
                     "expected %r not to match pattern %r"
                     % (filename, pattern))