snapshot of https://github.com/frappe/crm.git (develop, 2026-09-18; blobs > 131072B omitted)
Some checks failed
Frontend / Unit Tests & Coverage (push) Has been skipped
Regenerate POT file (translatable strings) / Regenerate POT file (develop) (push) Failing after 1m13s
Regenerate POT file (translatable strings) / Regenerate POT file (main-hotfix) (push) Failing after 6s
Server / Tests (frappe ${{ matrix.frappe-branch }}) (push) Has been skipped
Server / Resolve frappe matrix (push) Failing after 1s
Frontend / Lint (push) Failing after 1s
Frontend / Production Build (push) Failing after 1s
Server / Coverage Wrap Up (push) Has been skipped
Frontend / Coverage Wrap Up (push) Has been skipped
Some checks failed
Frontend / Unit Tests & Coverage (push) Has been skipped
Regenerate POT file (translatable strings) / Regenerate POT file (develop) (push) Failing after 1m13s
Regenerate POT file (translatable strings) / Regenerate POT file (main-hotfix) (push) Failing after 6s
Server / Tests (frappe ${{ matrix.frappe-branch }}) (push) Has been skipped
Server / Resolve frappe matrix (push) Failing after 1s
Frontend / Lint (push) Failing after 1s
Frontend / Production Build (push) Failing after 1s
Server / Coverage Wrap Up (push) Has been skipped
Frontend / Coverage Wrap Up (push) Has been skipped
This commit is contained in:
22
crm/tests/__init__.py
Normal file
22
crm/tests/__init__.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
import frappe
|
||||
|
||||
|
||||
def before_tests():
|
||||
load_crm_user_test_records()
|
||||
|
||||
|
||||
def load_crm_user_test_records():
|
||||
"""Load CRM user test records from crm/tests/test_records.json"""
|
||||
test_records_path = os.path.join(os.path.dirname(__file__), "test_records.json")
|
||||
|
||||
if os.path.exists(test_records_path):
|
||||
with open(test_records_path) as f:
|
||||
test_records = json.load(f)
|
||||
|
||||
for record in test_records:
|
||||
if not frappe.db.exists("User", record.get("email")):
|
||||
doc = frappe.get_doc(record)
|
||||
doc.insert(ignore_permissions=True, ignore_if_duplicate=True)
|
||||
Reference in New Issue
Block a user