Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix test due to rename change #26656

Merged
merged 7 commits into from
Aug 11, 2021
Merged

Conversation

ankush
Copy link
Member

@ankush ankush commented Jul 26, 2021

@ankush ankush closed this Jul 26, 2021
@ankush ankush deleted the fix_dn_test branch July 26, 2021 17:03
@ankush ankush restored the fix_dn_test branch August 11, 2021 06:09
@ankush ankush reopened this Aug 11, 2021
ankush and others added 2 commits August 11, 2021 11:40
- Use `frappe.db.get_value` instead of `get_doc` for asserting values
- Get values after cancellation as reloading attendance doc breaks due to stale doc (primary key changed after cancel of attendance request)
- rollback everything on tearDown
- Use `get_value` instead of `get_doc`
- Remove unnecessary loop, only one shift assignment is made against a shift request
- Get value after cancel again. Get doc is not reliable since primary key changed after cancel
- Separated into two tests, one checks if SI cancelling is blocked, the other checks PCE cancel impact
- This is done because after cancel via assertRaises, damage done by cancel still exists or is partially comitted
- Dont use this partially cancelled doc for any assertions further, end test at exception assertion
- Use `get_value` to check SI docstatus, as its primary key changes after cancel
- set cwip account in company to avoid value missing
- removed unused statement
- removed trailing spaces
@deepeshgarg007 deepeshgarg007 merged commit c0b9e9c into frappe:develop Aug 11, 2021
ankush added a commit that referenced this pull request Aug 17, 2021
* test: fix test due to rename change

* test: fix attendance request tests

- Use `frappe.db.get_value` instead of `get_doc` for asserting values
- Get values after cancellation as reloading attendance doc breaks due to stale doc (primary key changed after cancel of attendance request)
- rollback everything on tearDown

* test: fix Shift Request test

- Use `get_value` instead of `get_doc`
- Remove unnecessary loop, only one shift assignment is made against a shift request
- Get value after cancel again. Get doc is not reliable since primary key changed after cancel

* test: fix POS Closing Entry Test

- Separated into two tests, one checks if SI cancelling is blocked, the other checks PCE cancel impact
- This is done because after cancel via assertRaises, damage done by cancel still exists or is partially comitted
- Dont use this partially cancelled doc for any assertions further, end test at exception assertion
- Use `get_value` to check SI docstatus, as its primary key changes after cancel

* test: fixed asset movement tests

- set cwip account in company to avoid value missing
- removed unused statement
- removed trailing spaces

* Revert "test: fix POS Closing Entry Test"

This reverts commit 8f1a3ae.

Co-authored-by: marination <maricadsouza221197@gmail.com>
asoral pushed a commit to asoral/erpnext that referenced this pull request Nov 12, 2021
test: fix test due to rename change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants