Skip to content

Commit 6cc60b5

Browse files
MarkDaoustcopybara-github
authored andcommitted
chore: fix some failing tests.
PiperOrigin-RevId: 738534678
1 parent 4d0c812 commit 6cc60b5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

google/genai/tests/models/test_generate_content.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ class InstrumentEnum(Enum):
207207
'frequency_penalty': 0.5,
208208
},
209209
),
210-
exception_if_mldev='400',
211210
),
212211
pytest_helper.TestTableItem(
213212
name='test_google_search_tool',
@@ -1588,10 +1587,11 @@ class Foo(BaseModel):
15881587

15891588
def test_function(client):
15901589
def get_weather(city: str) -> str:
1590+
"""Returns the weather in a city."""
15911591
return f'The weather in {city} is sunny and 100 degrees.'
15921592

15931593
response = client.models.generate_content(
1594-
model='gemini-1.5-flash',
1594+
model='gemini-2.0-flash',
15951595
contents=(
15961596
'What is the weather like in Sunnyvale? Answer in very short'
15971597
' sentence.'
@@ -1690,8 +1690,8 @@ class SummaryResponses(BaseModel):
16901690

16911691
assert 'Shakespeare' in response.text
16921692
assert 'Hemingway' in response.text
1693-
assert 'Shakespeare' == response.parsed[0].person
1694-
assert 'Hemingway' == response.parsed[1].person
1693+
assert 'Shakespeare' in response.parsed[0].person
1694+
assert 'Hemingway' in response.parsed[1].person
16951695

16961696

16971697
def test_multiple_parts(client):

google/genai/tests/models/test_generate_content_part.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
types.PartDict({
273273
'file_data': {
274274
'file_uri': (
275-
'gs://vertexsdk-gcs/test_video2.mp4'
275+
'gs://generativeai-downloads/videos/Big_Buck_Bunny.mp4'
276276
),
277277
'mime_type': 'video/mp4',
278278
},

0 commit comments

Comments
 (0)