def test_replaceInFile(self):
        in_ = 'foo\nhey hey $VER\nbar\n'
        outf = open('release.replace', 'w')
        outf.write(in_)
        outf.close()

        expected = in_.replace('$VER', '2.0.0')
        replaceInFile('release.replace', {'$VER': '2.0.0'})
        self.assertEquals(open('release.replace').read(), expected)


        expected = expected.replace('2.0.0', '3.0.0')
        replaceInFile('release.replace', {'2.0.0': '3.0.0'})
        self.assertEquals(open('release.replace').read(), expected)
L{replaceInFile} replaces data in a file based on a dict. A key from
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/python/test/test_release.py/UtilityTest.test_replaceInFile