def METHOD_NAME(self):
    _file = tempfile.NamedTemporaryFile(delete=False, dir=self.temp_dir)
    _file.write(b"Testfile")
    _file.close()
    dir_path = os.path.dirname(_file.name)
    checksum_before = dir_checksum(dir_path)
    # add a file to .aws-sam/
    aws_sam_dir_path = os.path.join(dir_path, ".aws-sam")
    os.mkdir(aws_sam_dir_path)
    _new_file = tempfile.NamedTemporaryFile(delete=False, dir=aws_sam_dir_path)
    _new_file.write(b"dummy")
    _new_file.close()
    checksum_after = dir_checksum(os.path.dirname(_file.name))
    self.assertNotEqual(checksum_before, checksum_after)
    checksum_after_with_ignore_list = dir_checksum(os.path.dirname(_file.name), ignore_list=[".aws-sam"])
    self.assertEqual(checksum_before, checksum_after_with_ignore_list)