mirror of
https://github.com/OMGeeky/gpt-pilot.git
synced 2025-12-26 16:57:23 +01:00
fix fro test_Project
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
from typing import Tuple
|
||||
from utils.style import green_bold, yellow_bold, cyan, white_bold
|
||||
from utils.style import yellow_bold, cyan, white_bold
|
||||
from const.common import IGNORE_FOLDERS, STEPS
|
||||
from database.database import delete_unconnected_steps_from, delete_all_app_development_data
|
||||
from const.ipc import MESSAGE_TYPE
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import pytest
|
||||
from unittest.mock import patch, MagicMock
|
||||
from unittest.mock import patch
|
||||
from helpers.Project import Project
|
||||
from database.models.files import File
|
||||
|
||||
|
||||
project = Project({
|
||||
@@ -35,7 +36,7 @@ project.app = 'test'
|
||||
# 'None path absolute file', 'home path', 'home path same name', 'absolute path with name'
|
||||
])
|
||||
@patch('helpers.Project.update_file')
|
||||
@patch('helpers.Project.File.insert', new_callable=MagicMock)
|
||||
@patch('database.models.files.File.insert')
|
||||
def test_save_file(mock_file_insert, mock_update_file, test_data):
|
||||
# Given
|
||||
data = {'content': 'Hello World!'}
|
||||
|
||||
Reference in New Issue
Block a user