def tearDown(self): fm = FileManager() iq = ImportQueue() if os.path.isdir (fm.build_buffer_path(self.now)): shutil.rmtree(fm.build_buffer_path(self.now)) if os.path.isdir (iq.build_data_path(self.now)): shutil.rmtree(iq.build_data_path(self.now))
def test_upload_end_dst_exist(self): self.upload_all_files() iq = ImportQueue() os.mkdir (iq.build_data_path (self.now)) response = self.c.post(reverse('end_upload_data'), self.post_data_end_upload) self.assertContains (response, 'Ya existe un directorio', status_code=400)