Commit graph

7 commits

Author SHA1 Message Date
Gavin D'souza
2b4299a105 test: Set frappe.conf.developer_mode for test_rename_doc 2020-12-17 11:18:13 +05:30
Gavin D'souza
9d75094ba9 chore: Move reset flags to setup method
Reason for unsetting flags in setUp:
1. frappe.flags.whatever is reset in each request...since it's a werzeug local (ref: https://werkzeug.palletsprojects.com/en/1.0.x/local/)
2. so until it is in the context of current request, it has the same value
3. when you call rename_doc via a request, it's flags are forgotten post that
4. but in a test suite, the whole module's tests run in a single process and the flags aren't (un|re)set
5. which is why frappe.flags.whatever has the same value throughout this module's tests
2020-12-15 21:54:55 +05:30
marination
2d8550619d fix: Reset frappe.flag.link_fields in test
- Reset frappe.flag.link_fields in rename doctype tests
- Teardown doctypes appropriately after test
2020-12-15 16:04:16 +05:30
Gavin D'souza
147a3def0d fix: Use get_value to find value of linked_to_doctype instead
Tests ran successfully when run locally for mariaDB and postgres
2020-11-27 18:36:23 +05:30
Gavin D'souza
8a6bdf5466 chore: Move rename doctype method to dedicated TestCase
Co-authored-by: Marica <maricadsouza221197@gmail.com>
2020-11-27 16:49:49 +05:30
Gavin D'souza
6357bb6392 test: Drop table if exists 2020-11-12 11:51:42 +05:30
Gavin D'souza
71225783e6 test: Rename doc tests 2020-11-11 20:05:31 +05:30