api: Use the factory result image dir instead of filename for netboot

BUG=b:239795601
TEST=./run_tests

Change-Id: I1a057d4e651f30974173a2fe9b78fb880ab4a470
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3905573
Tested-by: Madeleine Hardt <hardtmad@google.com>
Reviewed-by: Jack Neus <jackneus@google.com>
Tested-by: Jack Neus <jackneus@google.com>
diff --git a/api/controller/image_unittest.py b/api/controller/image_unittest.py
index fb0b45d..dd230b7 100644
--- a/api/controller/image_unittest.py
+++ b/api/controller/image_unittest.py
@@ -221,7 +221,7 @@
         build_patch.assert_any_call(
             "board", [constants.IMAGE_TYPE_FACTORY_SHIM], config=mock.ANY
         )
-        netboot_patch.assert_any_call("board", factory_path.name)
+        netboot_patch.assert_any_call("board", os.path.dirname(factory_path))
 
 
 class RecoveryImageTest(