fix fro test_Project

This commit is contained in:
Nicholas Albion
2023-10-04 17:00:42 +11:00
parent 0c0d719d0f
commit 4f288f60d3
2 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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!'}