Просмотр исходного кода

test(fix): Generate Note to ensure at least one exists

ref: Failing Postgres CI on https://github.com/frappe/frappe/runs/5186523978?check_suite_focus=true
version-14
Gavin D'souza 3 лет назад
Родитель
Сommit
a403934265
1 измененных файлов: 4 добавлений и 0 удалений
  1. +4
    -0
      frappe/tests/test_document.py

+ 4
- 0
frappe/tests/test_document.py Просмотреть файл

@@ -271,6 +271,10 @@ class TestDocument(unittest.TestCase):
"""Virtual fields are accessible via API and Form views, whenever .as_dict is invoked
"""
frappe.db.delete("Custom Field", {"dt": "Note", "fieldname":"age"})
note = frappe.new_doc("Note")
note.content = "some content"
note.title = frappe.generate_hash(length=20)
note.insert()

def patch_note():
return patch("frappe.controllers", new={frappe.local.site: {'Note': CustomTestNote}})


Загрузка…
Отмена
Сохранить