mirror of
https://github.com/esphome/esphome.git
synced 2026-09-20 19:48:39 +00:00
Fix idedata test mock to use Path instead of str
The test set mock_image.path to str, but FlashImage.path is a Path. This masked a pre-existing bug where Path.endswith() doesn't exist. Fix the mock to match the real type so as_posix() works correctly.
This commit is contained in:
@@ -422,7 +422,7 @@ async def test_download_binary_handler_idedata_fallback(
|
||||
|
||||
# Mock idedata response
|
||||
mock_image = Mock()
|
||||
mock_image.path = str(bootloader_file)
|
||||
mock_image.path = bootloader_file
|
||||
mock_idedata_instance = Mock()
|
||||
mock_idedata_instance.extra_flash_images = [mock_image]
|
||||
mock_idedata.return_value = mock_idedata_instance
|
||||
|
||||
Reference in New Issue
Block a user