Skip to content

Commit 9c7ee3e

Browse files
committed
cleanup test
1 parent 13b3498 commit 9c7ee3e

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

tests/integration_tests/test_async_streaming.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import asyncio
99
import pytest
10-
from pydantic import BaseModel, Field
1110

1211
import guardrails as gd
1312
from guardrails.utils.casting_utils import to_int
@@ -22,11 +21,6 @@
2221
)
2322
from tests.integration_tests.test_assets.validators import LowerCase, MockDetectPII
2423

25-
expected_raw_output = {"statement": "I am DOING well, and I HOPE you aRe too."}
26-
expected_fix_output = {"statement": "i am doing well, and i hope you are too."}
27-
expected_noop_output = {"statement": "I am DOING well, and I HOPE you aRe too."}
28-
expected_filter_refrain_output = {}
29-
3024

3125
@register_validator(name="minsentencelength", data_type=["string", "list"])
3226
class MinSentenceLengthValidator(Validator):
@@ -137,52 +131,6 @@ async def gen():
137131
self.completion_stream = gen()
138132

139133

140-
class LowerCaseFix(BaseModel):
141-
statement: str = Field(
142-
description="Validates whether the text is in lower case.",
143-
validators=[LowerCase(on_fail=OnFailAction.FIX)],
144-
)
145-
146-
147-
class LowerCaseNoop(BaseModel):
148-
statement: str = Field(
149-
description="Validates whether the text is in lower case.",
150-
validators=[LowerCase(on_fail=OnFailAction.NOOP)],
151-
)
152-
153-
154-
class LowerCaseFilter(BaseModel):
155-
statement: str = Field(
156-
description="Validates whether the text is in lower case.",
157-
validators=[LowerCase(on_fail=OnFailAction.FILTER)],
158-
)
159-
160-
161-
class LowerCaseRefrain(BaseModel):
162-
statement: str = Field(
163-
description="Validates whether the text is in lower case.",
164-
validators=[LowerCase(on_fail=OnFailAction.REFRAIN)],
165-
)
166-
167-
168-
expected_minsentence_noop_output = ""
169-
170-
171-
class MinSentenceLengthNoOp(BaseModel):
172-
statement: str = Field(
173-
description="Validates whether the text is in lower case.",
174-
validators=[MinSentenceLengthValidator(on_fail=OnFailAction.NOOP)],
175-
)
176-
177-
178-
STR_PROMPT = "Say something nice to me."
179-
180-
PROMPT = """
181-
Say something nice to me.
182-
183-
${gr.complete_json_suffix}
184-
"""
185-
186134
POETRY_CHUNKS = [
187135
'"John, under ',
188136
"GOLDEN bridges",

0 commit comments

Comments
 (0)