示例#1
0
 def test_dont_overwrite_existing_file(self):
     from ZODB.scripts.repozo import WouldOverwriteFiles
     from ZODB.scripts.repozo import gen_filename
     from ZODB.scripts.repozo import find_files
     db = self._makeDB()
     options = self._makeOptions(full=False,
                                 file=db._file_name,
                                 gzip=False,
                                 test_now = (2010, 5, 14, 10, 51, 22),
                                 date = None,
                                )
     fqn = os.path.join(self._repository_directory, gen_filename(options))
     _write_file(fqn, b'TESTING')
     repofiles = find_files(options)
     self.assertRaises(WouldOverwriteFiles,
                       self._callFUT, options, 0, repofiles)
示例#2
0
 def test_dont_overwrite_existing_file(self):
     from ZODB.scripts.repozo import WouldOverwriteFiles
     from ZODB.scripts.repozo import gen_filename
     from ZODB.scripts.repozo import find_files
     db = self._makeDB()
     options = self._makeOptions(
         full=False,
         file=db._file_name,
         gzip=False,
         test_now=(2010, 5, 14, 10, 51, 22),
         date=None,
     )
     fqn = os.path.join(self._repository_directory, gen_filename(options))
     _write_file(fqn, b'TESTING')
     repofiles = find_files(options)
     self.assertRaises(WouldOverwriteFiles, self._callFUT, options, 0,
                       repofiles)
示例#3
0
 def _callFUT(self, options):
     from ZODB.scripts.repozo import find_files
     return find_files(options)
示例#4
0
 def _callFUT(self, options):
     from ZODB.scripts.repozo import find_files
     return find_files(options)