import fnmatch


def matchPattern(string, pattern):
    """
    > matchPattern("nameTest1", "nameTest")
    False
    > matchPattern("nameTest1", "nameTest*")
    True
    """
    return fnmatch.fnmatch(string, pattern)