@server()
    @with_fakes
    def test_get_use_sudo(self):
        """
        get(use_sudo=True) works by copying to a temporary path, downloading it and then removing it at the end
        """
        # the sha1 hash is the unique filename of the file being downloaded. sha1(<filename>)
        name = "229a29e5693876645e39de0cb0532e43ad73311a"
        fake_run = Fake('_run_command', callable=True, expect_call=True).with_matching_args(
            name % 'cp -p "/etc/apache2/apache2.conf" "%s"', True, True, None,
        ).next_call().with_matching_args(
            'chown username "%s"' % name, True, True, None,
        ).next_call().with_matching_args(
            'chmod 400 "%s"' % name, True, True, None,
        ).next_call().with_matching_args(
            'rm -f "%s"' % name, True, True, None,
        )
        fake_get = Fake('get', callable=True, expect_call=True).with_args(
            name, fudge_arg.any_value())

        with hide('everything'):
            with patched_context('fabric.operations', '_run_command', fake_run):
                with patched_context(SFTPClient, 'get', fake_get):
                    retval = get('/etc/apache2/apache2.conf', self.path(), use_sudo=True)
                    # check that the downloaded file has the same name as the one requested
                    assert retval[0].endswith('apache2.conf')
dataset/ETHPy150Open fabric/fabric/tests/test_operations.py/TestFileTransfers.test_get_use_sudo/swapped operands of `%`