def test_comma_data(self):
        """Test 'injectfile' with commas in the file"""

        file_data = "test123,456,789\ntest456,789\n"

        file_path = os.getcwd() + "/file_inject_test.%d" % os.getpid()

        if os.path.exists(file_path):
            os.unlink(file_path)

        b64_arg = base64.b64encode("%s,%s" % (file_path, file_data))

        self.commands.run_command('injectfile', b64_arg)

        self.assertTrue(os.path.exists(file_path))

        f = open(file_path, 'rb')
        target_file_data = f.read()
        f.close()

        self.assertEqual(file_data, target_file_data)

        os.unlink(file_path)
dataset/ETHPy150Open rackerlabs/openstack-guest-agents-unix/tests/test_injectfile.py/InjectFileTests.test_comma_data/original