test: clear singles cache for changed settings (#29430) (#29431)

(cherry picked from commit 3d3f0139fd)

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
mergify[bot]
2022-01-24 18:46:20 +05:30
committed by GitHub
parent aba8788ea2
commit d361e23a59

View File

@@ -92,6 +92,8 @@ def change_settings(doctype, settings_dict):
for key, value in settings_dict.items():
setattr(settings, key, value)
settings.save()
# singles are cached by default, clear to avoid flake
frappe.db.value_cache[settings] = {}
yield # yield control to calling function
finally: