Skip to content

Commit 12c721d

Browse files
committed
Use Mock for server test
1 parent abfe60b commit 12c721d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/test_server.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
import guidance
2-
from guidance import models, select, gen
3-
from .utils import get_model
41
import pytest
52
import multiprocessing
63
import time
74

85
def server_process():
96
from guidance import models, Server
107

11-
mistral = get_model("llama_cpp:")
8+
mistral = models.Mock()
129

1310
server = Server(mistral, api_key="SDFSDF")
1411
server.run(port=8392)
@@ -24,6 +21,6 @@ def running_server():
2421
def test_remote_llama_cpp_gen(running_server):
2522
from guidance import models, gen
2623

27-
m = models.LlamaCpp("http://localhost:8392", api_key="SDFSDF")
24+
m = models.Mock("http://localhost:8392", api_key="SDFSDF")
2825
m2 = m + "A story." + gen("test", max_tokens=20)
2926
assert len(str(m2)) > 20, "The model didn't generate enough data"

0 commit comments

Comments
 (0)