File tree 2 files changed +10
-12
lines changed
2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,10 @@ async def test_api_verbose_json_response_format_and_timestamp_granularities_comb
36
36
timestamp_granularities = timestamp_granularities ,
37
37
)
38
38
39
- assert transcription .__pydantic_extra__
40
39
if "word" in timestamp_granularities :
41
- assert transcription .__pydantic_extra__ . get ( " segments" ) is not None
42
- assert transcription .__pydantic_extra__ . get ( " words" ) is not None
40
+ assert transcription .segments is not None
41
+ assert transcription .words is not None
43
42
else :
44
43
# Unless explicitly requested, words are not present
45
- assert transcription .__pydantic_extra__ . get ( " segments" ) is not None
46
- assert transcription .__pydantic_extra__ . get ( " words" ) is None
44
+ assert transcription .segments is not None
45
+ assert transcription .words is None
Original file line number Diff line number Diff line change @@ -46,15 +46,14 @@ async def test_openai_verbose_json_response_format_and_timestamp_granularities_c
46
46
timestamp_granularities = timestamp_granularities ,
47
47
)
48
48
49
- assert transcription .__pydantic_extra__
50
49
if timestamp_granularities == ["word" ]:
51
50
# This is an exception where segments are not present
52
- assert transcription .__pydantic_extra__ . get ( " segments" ) is None
53
- assert transcription .__pydantic_extra__ . get ( " words" ) is not None
51
+ assert transcription .segments is None
52
+ assert transcription .words is not None
54
53
elif "word" in timestamp_granularities :
55
- assert transcription .__pydantic_extra__ . get ( " segments" ) is not None
56
- assert transcription .__pydantic_extra__ . get ( " words" ) is not None
54
+ assert transcription .segments is not None
55
+ assert transcription .words is not None
57
56
else :
58
57
# Unless explicitly requested, words are not present
59
- assert transcription .__pydantic_extra__ . get ( " segments" ) is not None
60
- assert transcription .__pydantic_extra__ . get ( " words" ) is None
58
+ assert transcription .segments is not None
59
+ assert transcription .words is None
You can’t perform that action at this time.
0 commit comments