Spaces:
Running
Running
Jeremiah Lowin commited on
Commit ·
208e515
1
Parent(s): 262b9ea
Fix FileUrl
Browse files
tests/prompts/test_base.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import pytest
|
| 2 |
from fastmcp.prompts.base import (
|
| 3 |
Prompt,
|
|
@@ -102,7 +103,7 @@ class TestRenderPrompt:
|
|
| 102 |
content=EmbeddedResource(
|
| 103 |
type="resource",
|
| 104 |
resource=TextResourceContents(
|
| 105 |
-
uri="file://file.txt",
|
| 106 |
text="File contents",
|
| 107 |
mimeType="text/plain",
|
| 108 |
),
|
|
@@ -115,7 +116,7 @@ class TestRenderPrompt:
|
|
| 115 |
content=EmbeddedResource(
|
| 116 |
type="resource",
|
| 117 |
resource=TextResourceContents(
|
| 118 |
-
uri="file://file.txt",
|
| 119 |
text="File contents",
|
| 120 |
mimeType="text/plain",
|
| 121 |
),
|
|
@@ -133,7 +134,7 @@ class TestRenderPrompt:
|
|
| 133 |
content=EmbeddedResource(
|
| 134 |
type="resource",
|
| 135 |
resource=TextResourceContents(
|
| 136 |
-
uri="file://file.txt",
|
| 137 |
text="File contents",
|
| 138 |
mimeType="text/plain",
|
| 139 |
),
|
|
@@ -151,7 +152,7 @@ class TestRenderPrompt:
|
|
| 151 |
content=EmbeddedResource(
|
| 152 |
type="resource",
|
| 153 |
resource=TextResourceContents(
|
| 154 |
-
uri="file://file.txt",
|
| 155 |
text="File contents",
|
| 156 |
mimeType="text/plain",
|
| 157 |
),
|
|
@@ -171,7 +172,7 @@ class TestRenderPrompt:
|
|
| 171 |
"content": {
|
| 172 |
"type": "resource",
|
| 173 |
"resource": {
|
| 174 |
-
"uri": "file://file.txt",
|
| 175 |
"text": "File contents",
|
| 176 |
"mimeType": "text/plain",
|
| 177 |
},
|
|
@@ -184,7 +185,7 @@ class TestRenderPrompt:
|
|
| 184 |
content=EmbeddedResource(
|
| 185 |
type="resource",
|
| 186 |
resource=TextResourceContents(
|
| 187 |
-
uri="file://file.txt",
|
| 188 |
text="File contents",
|
| 189 |
mimeType="text/plain",
|
| 190 |
),
|
|
|
|
| 1 |
+
from pydantic import FileUrl
|
| 2 |
import pytest
|
| 3 |
from fastmcp.prompts.base import (
|
| 4 |
Prompt,
|
|
|
|
| 103 |
content=EmbeddedResource(
|
| 104 |
type="resource",
|
| 105 |
resource=TextResourceContents(
|
| 106 |
+
uri=FileUrl("file://file.txt"),
|
| 107 |
text="File contents",
|
| 108 |
mimeType="text/plain",
|
| 109 |
),
|
|
|
|
| 116 |
content=EmbeddedResource(
|
| 117 |
type="resource",
|
| 118 |
resource=TextResourceContents(
|
| 119 |
+
uri=FileUrl("file://file.txt"),
|
| 120 |
text="File contents",
|
| 121 |
mimeType="text/plain",
|
| 122 |
),
|
|
|
|
| 134 |
content=EmbeddedResource(
|
| 135 |
type="resource",
|
| 136 |
resource=TextResourceContents(
|
| 137 |
+
uri=FileUrl("file://file.txt"),
|
| 138 |
text="File contents",
|
| 139 |
mimeType="text/plain",
|
| 140 |
),
|
|
|
|
| 152 |
content=EmbeddedResource(
|
| 153 |
type="resource",
|
| 154 |
resource=TextResourceContents(
|
| 155 |
+
uri=FileUrl("file://file.txt"),
|
| 156 |
text="File contents",
|
| 157 |
mimeType="text/plain",
|
| 158 |
),
|
|
|
|
| 172 |
"content": {
|
| 173 |
"type": "resource",
|
| 174 |
"resource": {
|
| 175 |
+
"uri": FileUrl("file://file.txt"),
|
| 176 |
"text": "File contents",
|
| 177 |
"mimeType": "text/plain",
|
| 178 |
},
|
|
|
|
| 185 |
content=EmbeddedResource(
|
| 186 |
type="resource",
|
| 187 |
resource=TextResourceContents(
|
| 188 |
+
uri=FileUrl("file://file.txt"),
|
| 189 |
text="File contents",
|
| 190 |
mimeType="text/plain",
|
| 191 |
),
|