Browse Source

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 years ago
parent
commit
a403934265
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      frappe/tests/test_document.py

+ 4
- 0
frappe/tests/test_document.py View File

@@ -271,6 +271,10 @@ class TestDocument(unittest.TestCase):
"""Virtual fields are accessible via API and Form views, whenever .as_dict is invoked """Virtual fields are accessible via API and Form views, whenever .as_dict is invoked
""" """
frappe.db.delete("Custom Field", {"dt": "Note", "fieldname":"age"}) 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(): def patch_note():
return patch("frappe.controllers", new={frappe.local.site: {'Note': CustomTestNote}}) return patch("frappe.controllers", new={frappe.local.site: {'Note': CustomTestNote}})


Loading…
Cancel
Save