Beispiel #1
0
 def setUp(self):
     # start test with blank config
     super(RestoreTest, self).setUp()
     # clear dest folder
     backpy.delete_temp_files(self.dest_root)
     # add some entries to config
     self.add_one_folder()
     self.add_six_seven_folder()
Beispiel #2
0
 def setUp(self):
     # start test with blank config
     super(RestoreTest, self).setUp()
     # clear dest folder
     backpy.delete_temp_files(self.dest_root)
     # add some entries to config
     self.add_one_folder()
     self.add_six_seven_folder()
Beispiel #3
0
 def setUp(self):
     # start test with blank config
     super(BackupTest, self).setUp()
     # clear dest folder
     backpy.delete_temp_files(self.dest_root)
     # add some entries to config
     self.add_global_skips('*.jpg,*.tif')
     self.add_one_folder()
     self.add_six_seven_folder()
     self.one_folder = os.path.join(self.dest_root, 'one')
     self.six_seven_folder = os.path.join(self.dest_root, 'six seven')
Beispiel #4
0
 def setUp(self):
     # start test with blank config
     super(BackupTest, self).setUp()
     # clear dest folder
     backpy.delete_temp_files(self.dest_root)
     # add some entries to config
     self.add_global_skips('*.jpg,*.tif')
     self.add_one_folder()
     self.add_six_seven_folder()
     self.one_folder = os.path.join(self.dest_root, 'one')
     self.six_seven_folder = os.path.join(self.dest_root, 'six seven')
Beispiel #5
0
    def setUp(self):
        backpy.logger.debug('starting test {}'.format(unittest.TestCase.id(self)))
        # start test with blank config
        if os.path.exists(backpy.CONFIG_FILE):
            os.unlink(backpy.CONFIG_FILE)
        backpy.init(backpy.CONFIG_FILE)

        # and blank resource dir
        res_dir = os.path.join(backpy.TEMP_DIR, 'resources')
        if os.path.exists(res_dir):
            backpy.delete_temp_files(res_dir)

        # copy resources
        copytree(os.path.join(self.project_dir, 'resources'), res_dir)
Beispiel #6
0
    def setUp(self):
        # start test with blank config
        super(AdbTest, self).setUp()
        # clear dest folder
        backpy.delete_temp_files(self.dest_root)
        # copy source files onto device
        push_files(os.path.join(self.project_dir, 'resources', 'source_files'),
                   self.android_root)

        self.one_folder = os.path.join(self.dest_root, 'one')
        self.six_seven_folder = os.path.join(self.dest_root, 'six seven')
        self.files_to_backup = [[
            '{0}/one'.format(self.android_root), self.one_folder
        ], ['{0}/six seven'.format(self.android_root), self.six_seven_folder]]
        backpy.logger.debug('AdbTest setUp done')
Beispiel #7
0
    def setUp(self):
        backpy.logger.debug('starting test {}'.format(
            unittest.TestCase.id(self)))
        # start test with blank config
        if os.path.exists(backpy.CONFIG_FILE):
            os.unlink(backpy.CONFIG_FILE)
        backpy.init(backpy.CONFIG_FILE)

        # and blank resource dir
        res_dir = os.path.join(backpy.TEMP_DIR, 'resources')
        if os.path.exists(res_dir):
            backpy.delete_temp_files(res_dir)

        # copy resources
        copytree(os.path.join(self.project_dir, 'resources'), res_dir)
Beispiel #8
0
    def setUp(self):
        # start test with blank config
        super(AdbTest, self).setUp()
        # clear dest folder
        backpy.delete_temp_files(self.dest_root)
        # copy source files onto device
        push_files(
            os.path.join(self.project_dir, 'resources', 'source_files'),
            self.android_root
        )

        self.one_folder = os.path.join(self.dest_root, 'one')
        self.six_seven_folder = os.path.join(self.dest_root, 'six seven')
        self.files_to_backup = [
            ['{0}/one'.format(self.android_root), self.one_folder],
            ['{0}/six seven'.format(self.android_root), self.six_seven_folder]
        ]
        backpy.logger.debug('AdbTest setUp done')
Beispiel #9
0
 def delete_all_folders(self):
     backpy.delete_temp_files(self.src_root)
Beispiel #10
0
 def delete_all_folders(self):
     backpy.delete_temp_files(self.src_root)
Beispiel #11
0
 def delete_six_seven(self):
     backpy.delete_temp_files(os.path.join(self.src_root, 'six seven'))
Beispiel #12
0
 def delete_one_four(self):
     backpy.delete_temp_files(os.path.join(self.src_root, 'one', 'four'))
Beispiel #13
0
 def delete_one_nine_ten(self):
     backpy.delete_temp_files(os.path.join(self.src_root, 'one', 'nine ten'))
Beispiel #14
0
 def delete_files(self, filepath):
     backpy.delete_temp_files(filepath)
Beispiel #15
0
 def delete_files(self, filepath):
     backpy.delete_temp_files(filepath)
Beispiel #16
0
 def delete_six_seven(self):
     backpy.delete_temp_files(os.path.join(self.src_root, 'six seven'))
Beispiel #17
0
 def delete_one_four(self):
     backpy.delete_temp_files(os.path.join(self.src_root, 'one', 'four'))
Beispiel #18
0
 def delete_one_nine_ten(self):
     backpy.delete_temp_files(os.path.join(self.src_root, 'one',
                                           'nine ten'))