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

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


        expected = expected.replace('2.0.0', '3.0.0')
        replaceInFile('release.replace', {'2.0.0': '3.0.0'})
        self.assertEqual(open('release.replace').read(), expected)
populate and returns filtered items
dataset/ETHPy150Open twisted/twisted/twisted/python/test/test_release.py/UtilityTests.test_replaceInFile--crossover with--dataset/ETHPy150Open django-leonardo/django-leonardo/leonardo/module/web/widgets/mixins.py/ListMixin.populate_items