def METHOD_NAME(self):
    with tempfile.TemporaryDirectory() as tmpdir:
        primary_file_lines = [
            "root:x:0:\n",
            "bin:x:1:\n"
        ]
        secondary_file_lines = [
            "bin:x:4:\n",
            "daemon:x:2:\n"
        ]
        result_file_lines = [
            "root:x:0:\n",
            "bin:x:1:\n",
            "daemon:x:2:\n"
        ]
        with open(os.path.join(tmpdir, "primary"), "w", encoding="utf8") as f:
            f.writelines(primary_file_lines)
        with open(os.path.join(tmpdir, "secondary"), "w", encoding="utf8") as f:
            f.writelines(secondary_file_lines)
        passwd = ostree.PasswdLike.from_file(os.path.join(tmpdir, "primary"))
        passwd.merge_with_file(os.path.join(tmpdir, "secondary"))
        passwd.dump_to_file(os.path.join(tmpdir, "result"))
        with open(os.path.join(tmpdir, "result"), "r", encoding="utf8") as f:
            self.assertEqual(sorted(f.readlines()), sorted(result_file_lines))