Commit d8a9dbf
Fix: Correct swapped mock variable usage in test_upload_image_asset.py (Final)
This commit resolves an AssertionError in the `test_main_success` method
of `examples/misc/tests/test_upload_image_asset.py`.
The issue was a persistent mismatch in the usage of mock arguments passed
into the test method due to decorator order. The variable intended for the
`get_image_bytes_from_url` mock was actually holding the `builtins.print`
mock, and vice-versa.
The test method's body has been updated to use the correct mock variables
for their intended purposes, based on detailed tracebacks:
- Configuring and asserting calls on the `get_image_bytes_from_url` mock
now uses the correct parameter from the test method signature.
- Asserting calls on the `builtins.print` mock also now uses the correct
parameter.
This ensures that assertions are made on the appropriate mock objects.1 parent d6289e9 commit d8a9dbf
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
0 commit comments