示例#1
0
    def setUp(self):
        self.config = MSDSConfig(localdir=tempfile.mkdtemp())
        self.api = MSDataSyncAPI(self.config, msds_log)
        self.impl = MSDSImpl(msds_log, self.api)

        # method stub
        self.api.post_sync_step = dingus.Dingus()

        def remove_localdir():
            os.rmdir(self.config["localdir"])

        self.addCleanup(remove_localdir)

        self.rsyncconfig = self.RemoteSyncParamsStub({
            "filename1": (False, False),  # this file didn't change
            "filename2": (False, False),  # this file didn't change
            "filename3": (False, True),  # this file changed
            "asdf": (False, True),  # this file changed
        })

        self.filename_id_map = {
            "filename1": (1, 10),
            "filename2": (2, 20),
            "filename3": (3, 30),
            "filename4": (4, 40),
        }
示例#2
0
 def setUp(self):
     self.config = MSDSConfig()
     self.api = MSDataSyncAPI(self.config, msds_log)