9
9
10
10
from tests .utils import assert_matches_type
11
11
from beats_foundation import Beatsfoundation , AsyncBeatsfoundation
12
- from beats_foundation .types import Song , SongListResponse
12
+ from beats_foundation .types import Song , SongListResponse , SongCreateResponse
13
13
14
14
base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
15
15
@@ -22,7 +22,7 @@ def test_method_create(self, client: Beatsfoundation) -> None:
22
22
song = client .songs .create (
23
23
prompt = "prompt" ,
24
24
)
25
- assert_matches_type (object , song , path = ["response" ])
25
+ assert_matches_type (SongCreateResponse , song , path = ["response" ])
26
26
27
27
@parametrize
28
28
def test_method_create_with_all_params (self , client : Beatsfoundation ) -> None :
@@ -33,7 +33,7 @@ def test_method_create_with_all_params(self, client: Beatsfoundation) -> None:
33
33
lyrics = "lyrics" ,
34
34
mood = "mood" ,
35
35
)
36
- assert_matches_type (object , song , path = ["response" ])
36
+ assert_matches_type (SongCreateResponse , song , path = ["response" ])
37
37
38
38
@parametrize
39
39
def test_raw_response_create (self , client : Beatsfoundation ) -> None :
@@ -44,7 +44,7 @@ def test_raw_response_create(self, client: Beatsfoundation) -> None:
44
44
assert response .is_closed is True
45
45
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
46
46
song = response .parse ()
47
- assert_matches_type (object , song , path = ["response" ])
47
+ assert_matches_type (SongCreateResponse , song , path = ["response" ])
48
48
49
49
@parametrize
50
50
def test_streaming_response_create (self , client : Beatsfoundation ) -> None :
@@ -55,7 +55,7 @@ def test_streaming_response_create(self, client: Beatsfoundation) -> None:
55
55
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
56
56
57
57
song = response .parse ()
58
- assert_matches_type (object , song , path = ["response" ])
58
+ assert_matches_type (SongCreateResponse , song , path = ["response" ])
59
59
60
60
assert cast (Any , response .is_closed ) is True
61
61
@@ -139,7 +139,7 @@ async def test_method_create(self, async_client: AsyncBeatsfoundation) -> None:
139
139
song = await async_client .songs .create (
140
140
prompt = "prompt" ,
141
141
)
142
- assert_matches_type (object , song , path = ["response" ])
142
+ assert_matches_type (SongCreateResponse , song , path = ["response" ])
143
143
144
144
@parametrize
145
145
async def test_method_create_with_all_params (self , async_client : AsyncBeatsfoundation ) -> None :
@@ -150,7 +150,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncBeatsfound
150
150
lyrics = "lyrics" ,
151
151
mood = "mood" ,
152
152
)
153
- assert_matches_type (object , song , path = ["response" ])
153
+ assert_matches_type (SongCreateResponse , song , path = ["response" ])
154
154
155
155
@parametrize
156
156
async def test_raw_response_create (self , async_client : AsyncBeatsfoundation ) -> None :
@@ -161,7 +161,7 @@ async def test_raw_response_create(self, async_client: AsyncBeatsfoundation) ->
161
161
assert response .is_closed is True
162
162
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
163
163
song = await response .parse ()
164
- assert_matches_type (object , song , path = ["response" ])
164
+ assert_matches_type (SongCreateResponse , song , path = ["response" ])
165
165
166
166
@parametrize
167
167
async def test_streaming_response_create (self , async_client : AsyncBeatsfoundation ) -> None :
@@ -172,7 +172,7 @@ async def test_streaming_response_create(self, async_client: AsyncBeatsfoundatio
172
172
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
173
173
174
174
song = await response .parse ()
175
- assert_matches_type (object , song , path = ["response" ])
175
+ assert_matches_type (SongCreateResponse , song , path = ["response" ])
176
176
177
177
assert cast (Any , response .is_closed ) is True
178
178
0 commit comments