'When a gobbing expression is used local files are transferred with
remote file names based on local names.
when a remote folder is requested remote paths are composed from
remote path and local filename.'

def test_cmd_PUTMultipleWithRemotePath(self):

    first = self.makeFile()
    firstName = os.path.basename(first)
    secondName = 'second-name'
    parent = os.path.dirname(first)
    second = self.makeFile(path=os.path.join(parent, secondName))
    flags = ((filetransfer.FXF_WRITE | filetransfer.FXF_CREAT) | filetransfer.FXF_TRUNC)
    firstRemoteFile = InMemoryRemoteFile(firstName)
    secondRemoteFile = InMemoryRemoteFile(secondName)
    firstRemotePath = ('/remote/%s' % (firstName,))
    secondRemotePath = ('/remote/%s' % (secondName,))
    self.fakeFilesystem.put(firstRemotePath, flags, defer.succeed(firstRemoteFile))
    self.fakeFilesystem.put(secondRemotePath, flags, defer.succeed(secondRemoteFile))
    deferred = self.client.cmd_PUT(('%s    remote' % (os.path.join(parent, '*'),)))
    self.successResultOf(deferred)
    self.assertTrue(firstRemoteFile._closed)
    self.assertEqual('', firstRemoteFile.getvalue())
    self.assertTrue(secondRemoteFile._closed)
    self.assertEqual('', secondRemoteFile.getvalue())
    self.checkPutMessage([(first, firstName, ['100%    0.0B']), (second, secondName, ['100%    0.0B'])], randomOrder=True)
