Support simulating file fetch errors in TestTool.

Review Request #12294 — Created May 22, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

TestTool.get_file() now accepts special bad:file-not-found and
bad:scm-error paths that will simulate the FileNotFoundError and
SCMError exceptions, respectively. This can aid in testing against
these sorts of results without needing to spy on methods.

Made use of this in an upcoming change. Simulated both error types.

Changes between revision 1 and 2

orig
1
2

Commits

Summary ID Author
Support simulating file fetch errors in TestTool.
`TestTool.get_file()` now accepts special `bad:file-not-found` and `bad:scm-error` paths that will simulate the `FileNotFoundError` and `SCMError` exceptions, respectively. This can aid in testing against these sorts of results without needing to spy on methods.
8d932b93dc6bbc44c8613c2c840ef0312fe4d22d Christian Hammond
Support simulating file fetch errors in TestTool.
`TestTool.get_file()` now accepts special `bad:file-not-found` and `bad:scm-error` paths that will simulate the `FileNotFoundError` and `SCMError` exceptions, respectively. This can aid in testing against these sorts of results without needing to spy on methods.
9e50c48d637c9521f22a36da13bf9ccfba7b2eff Christian Hammond
reviewboard/testing/scmtool.py
Loading...