Kaynağa Gözat

Test the hint's substance, not its exact wording

The reworded platform_hint dropped the remote-URL and no-shelling-out
sentences, which the assertions still demanded. Check only what the hint
has to keep doing: point local files at MEDIA: and rule markdown out for
them. Wording stays free to change without breaking the suite.
Paul Klumpp 1 hafta önce
ebeveyn
işleme
fb94202061
1 değiştirilmiş dosya ile 3 ekleme ve 6 silme
  1. 3 6
      test_adapter.py

+ 3 - 6
test_adapter.py

@@ -257,12 +257,10 @@ class TestRegistration:
 
     def test_platform_hint_advertises_media_sending(self):
         """This hint is the only thing telling the model the channel can carry
-        files — without it the agent shells out to a CLI to deliver an image."""
+        files — without it the agent has no idea it can deliver an image."""
         ctx = _MockPluginContext()
         register(ctx)
-        hint = ctx.registered_kwargs["platform_hint"]
-        assert "MEDIA:/absolute/path/to/file" in hint
-        assert "![alt](https://...)" in hint
+        assert "MEDIA:/absolute/path/to/file" in ctx.registered_kwargs["platform_hint"]
 
     def test_platform_hint_rules_out_markdown_for_local_files(self):
         """gateway's extract_images only matches https?:// — markdown pointing at
@@ -270,8 +268,7 @@ class TestRegistration:
         ctx = _MockPluginContext()
         register(ctx)
         hint = ctx.registered_kwargs["platform_hint"]
-        assert "file:///path" in hint
-        assert "MEDIA:" in hint
+        assert "Do NOT use markdown image syntax for local files" in hint
 
     def test_startup_logs_the_capabilities(self, caplog):
         with caplog.at_level("INFO"):