def test_policy_overwrite_file_content(self):
        os.mkdir(self.build_dir)
        test_file = os.path.join(self.build_dir, 'filec.txt')
        with open(test_file, 'w') as f:
            f.write('Some random text')
        os.chmod(test_file, stat.S_IRUSR | stat.S_IWUSR)
        self.build_scaffold(
            'test-template-6', overwrite_target_root=True,
            existing_policy=Scaffold.EXISTING_OVERWRITE,
            variables={'name': 'happyman', 'age': 25}
        )
        assert self.exists('filec.txt', type='file')
        assert 'Hello there {{{ name }}}' in self.contents('filec.txt')
        assert get_permissions(test_file) == 0o664
        assert self.logged('Copying and overwriting file')
dataset/ETHPy150Open fgimian/flaskage/tests/test_scaffold.py/TestScaffold.test_policy_overwrite_file_content/original