Exemplo n.º 1
0
 def test_backup_of_child_directories(
         self, patch_isdir, patch_listdir, patch_getmtime, patch_shutil_copytree, path_os_exists):
     """
     Test that all directories which meet the 'ignore criteria are backed-up'
     """
     copy_tree('/src', '/dst', ignore=ignore_time('>=', datetime.now().isoformat()))
     self.assertTrue(patch_shutil_copytree.called)
Exemplo n.º 2
0
 def test_skipped_backup_of_root_files_with_modification_dates_not_meeting_greater_than_filter_criteria(
         self, patch_isdir, patch_listdir, patch_getmtime, patch_shutil_copy2):
     """
     Test that all root directories whose modification dates do not meet the 'data_dt_filter'
     less-than iso timestamp are not backed-up
     """
     copy_tree('/src', '/dst', ignore=ignore_time('>', datetime.now().isoformat()))
     self.assertTrue(patch_shutil_copy2.called)