mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-24 05:38:25 +00:00
Temp services `ToFilesystemService` and `FromFilesystemService` for migrating files To and From the filesystem - Not sure where these classes will end up Tests to call the two services. upgrade method in migration that writes workflow spec files and metadata to filesystem
19 lines
508 B
Python
19 lines
508 B
Python
from tests.base_test import BaseTest
|
|
|
|
from crc import session
|
|
from crc.models.file import FileModel
|
|
from crc.services.temp_migration_service import ToFilesystemService
|
|
|
|
|
|
class TestFilesToFilesystem(BaseTest):
|
|
|
|
def test_files_to_filesystem(self):
|
|
self.load_example_data()
|
|
|
|
files = session.query(FileModel).all()
|
|
for file in files:
|
|
if file.archived is not True:
|
|
ToFilesystemService().write_file_to_system(file)
|
|
|
|
print('test_files_to_filesystem')
|