Commit 9c2e980
committed
Fix: Correct swapped mock variable usage in test_upload_image_asset.py
This commit resolves an AssertionError in the `test_main_success` method
of `examples/misc/tests/test_upload_image_asset.py`.
The issue was due to mock arguments in the test method's signature
being used incorrectly because their names did not align with the
actual mocks passed by the `unittest.mock.patch` decorators due to
decorator application order (first mock argument was `builtins.print`'s
mock, second was `get_image_bytes_from_url`'s mock, but variable names
suggested the reverse).
The test method's body has been updated to use the correct mock
variables for their intended purposes:
- Configuring and asserting calls on the `get_image_bytes_from_url` mock.
- Asserting calls on the `builtins.print` mock.1 parent a2cc9de commit 9c2e980
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| |||
0 commit comments