diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a4ba6d..c3419e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,8 @@ jobs: matrix: # 3.10 - 04 Oct 2021 # 3.11 - 24 Oct 2022 - python-version: ['3.9', '3.10', '3.11', '3.12'] + python-version: ['3.9'] +# python-version: ['3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v4 diff --git a/pilot/helpers/Project.py b/pilot/helpers/Project.py index 013e32d..9bc3a83 100644 --- a/pilot/helpers/Project.py +++ b/pilot/helpers/Project.py @@ -227,14 +227,8 @@ class Project: data['path'], data['full_path'] = self.get_full_file_path(data['path'], data['name']) - logger.info(f'-------------update_file: {update_file}') - print('--------------------------------------') - print(update_file) - return str(update_file) + update_file(data['full_path'], data['content']) - - # update_file(data['full_path'], data['content']) - # # (File.insert(app=self.app, path=data['path'], name=data['name'], full_path=data['full_path']) # .on_conflict( # conflict_target=[File.app, File.name, File.path], diff --git a/pilot/helpers/__init__.py b/pilot/helpers/__init__.py index 7bacb04..030b6ea 100644 --- a/pilot/helpers/__init__.py +++ b/pilot/helpers/__init__.py @@ -1,2 +1,2 @@ from .AgentConvo import AgentConvo -from .Project import Project +# from .Project import Project diff --git a/pilot/helpers/test_Project.py b/pilot/helpers/test_Project.py index 121cdc3..a7ae6f4 100644 --- a/pilot/helpers/test_Project.py +++ b/pilot/helpers/test_Project.py @@ -53,20 +53,18 @@ def test_save_file( if test_data['path'] is not None: data['path'] = test_data['path'] - # mock_update_file = mocker.patch('helpers.Project.update_file', return_value=None) - # mocker.patch('helpers.Project.File') - print('bump CI !!!!!!!!!!!!!!!!!!!!!!!!!!!!!') + mock_update_file = mocker.patch('helpers.Project.update_file', return_value=None) + mocker.patch('helpers.Project.File') project = create_project() # When - result = project.save_file(data) + project.save_file(data) - assert result == '' # Then assert that update_file with the correct path expected_saved_to = test_data['saved_to'] - # mock_update_file.assert_called_once_with(expected_saved_to, 'Hello World!') + mock_update_file.assert_called_once_with(expected_saved_to, 'Hello World!') # Also assert that File.insert was called with the expected arguments