Exemple #1
0
class LocalRemoteSynchronizerTest(AbstractSynchronizerTest):
    __test__ = True

    def setUp(self):
        self.storagedir = tempfile.mkdtemp()
        self.storage = Storage(self.storagedir)

        self.tempdir1 = tempfile.mkdtemp()
        self.local_client = LocalClient(self.tempdir1)

        self.remote_client = RemoteClient(REPOSITORY_URL, USERNAME, PASSWORD,
                                          REMOTE_PATH)
        try:
            self.remote_client.delete(self.FILE_PATH)
        except ObjectNotFoundException:
            pass

        self.synchronizer = Synchronizer(
            self.storage, self.local_client, self.remote_client)

    def tearDown(self):
        shutil.rmtree(self.storagedir)
        shutil.rmtree(self.tempdir1)
        try:
            self.remote_client.delete(self.FILE_PATH)
        except ObjectNotFoundException:
            pass
Exemple #2
0
    def setUp(self):
        self.storagedir = tempfile.mkdtemp()
        self.storage = Storage(self.storagedir)

        self.tempdir1 = tempfile.mkdtemp()
        self.local_client = LocalClient(self.tempdir1)

        self.remote_client = RemoteClient(REPOSITORY_URL, USERNAME, PASSWORD,
                                          REMOTE_PATH)
        try:
            self.remote_client.delete(self.FILE_PATH)
        except ObjectNotFoundException:
            pass

        self.synchronizer = Synchronizer(
            self.storage, self.local_client, self.remote_client)