A set of pytest fixtures to test Frappe applications
MIT License
allow_tests
get_current_site
functionPublished by 0xsirsaif about 1 year ago
FrappeMockedDB
class to mock frappe.db
object methodsfrom pytest_frappe import FrappeMockedDB
def test_function(monkeypatch):
def _mock_get_single_value(*args, **kwargs):
return False
monkeypatch.setattr(frappe, "db", FrappeMockedDB({"get_single_value": _mock_get_single_value}))
assert True
Published by 0xsirsaif over 1 year ago
Published by 0xsirsaif over 1 year ago
A set of pytest fixtures to test Frappe applications