@@ -101,8 +101,8 @@ def test_shows_teams(
101101 200 ,
102102 json = {
103103 "data" : [
104- {"name" : "team1" , "slug" : "team1" },
105- {"name" : "team2" , "slug" : "team2" },
104+ {"name" : "team1" , "slug" : "team1" , "id" : "123" },
105+ {"name" : "team2" , "slug" : "team2" , "id" : "456" },
106106 ]
107107 },
108108 )
@@ -130,8 +130,8 @@ def test_asks_for_app_name_after_team(
130130 200 ,
131131 json = {
132132 "data" : [
133- {"name" : "team1" , "slug" : "team1" },
134- {"name" : "team2" , "slug" : "team2" },
133+ {"name" : "team1" , "slug" : "team1" , "id" : "123" },
134+ {"name" : "team2" , "slug" : "team2" , "id" : "456" },
135135 ]
136136 },
137137 )
@@ -158,13 +158,13 @@ def test_creates_app_on_backend(
158158 200 ,
159159 json = {
160160 "data" : [
161- {"name" : "team1" , "slug" : "team1" },
161+ {"name" : "team1" , "slug" : "team1" , "id" : "123" },
162162 ]
163163 },
164164 )
165165 )
166166
167- respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_slug " : "team1 " }).mock (
167+ respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_id " : "123 " }).mock (
168168 return_value = Response (
169169 201 ,
170170 json = {"id" : "1234" , "name" : "demo" , "team_id" : "123" , "slug" : "demo" },
@@ -192,13 +192,13 @@ def test_creates_and_uploads_deployment_then_fails(
192192 200 ,
193193 json = {
194194 "data" : [
195- {"name" : "team1" , "slug" : "team1" },
195+ {"name" : "team1" , "slug" : "team1" , "id" : "123" },
196196 ]
197197 },
198198 )
199199 )
200200
201- respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_slug " : "team1 " }).mock (
201+ respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_id " : "123 " }).mock (
202202 return_value = Response (
203203 201 , json = {"id" : "1234" , "name" : "demo" , "team_id" : "123" , "slug" : "demo" }
204204 )
@@ -271,13 +271,13 @@ def test_exists_successfully_when_deployment_is_done(
271271 200 ,
272272 json = {
273273 "data" : [
274- {"name" : "team1" , "slug" : "team1" },
274+ {"name" : "team1" , "slug" : "team1" , "id" : "123" },
275275 ]
276276 },
277277 )
278278 )
279279
280- respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_slug " : "team1 " }).mock (
280+ respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_id " : "123 " }).mock (
281281 return_value = Response (
282282 201 , json = {"id" : "1234" , "name" : "demo" , "team_id" : "123" , "slug" : "demo" }
283283 )
@@ -346,7 +346,7 @@ def test_exists_successfully_when_deployment_is_done_when_app_is_configured(
346346 config_path = tmp_path / ".fastapi" / "cloud.json"
347347
348348 config_path .parent .mkdir (parents = True , exist_ok = True )
349- config_path .write_text ('{"app_id": "1234"}' )
349+ config_path .write_text ('{"app_id": "1234", "team_id": "123" }' )
350350
351351 respx_mock .get ("/apps/1234" ).mock (
352352 return_value = Response (200 , json = {"slug" : "demo" , "id" : "1234" })
@@ -413,7 +413,7 @@ def test_shows_error_when_app_does_not_exist(
413413 config_path = tmp_path / ".fastapi" / "cloud.json"
414414
415415 config_path .parent .mkdir (parents = True , exist_ok = True )
416- config_path .write_text ('{"app_id": "some-random-id"}' )
416+ config_path .write_text ('{"app_id": "some-random-id", "team_id": "123" }' )
417417
418418 respx_mock .get ("/apps/some-random-id" ).mock (return_value = Response (404 ))
419419
@@ -436,13 +436,13 @@ def test_can_skip_waiting(
436436 200 ,
437437 json = {
438438 "data" : [
439- {"name" : "team1" , "slug" : "team1" },
439+ {"name" : "team1" , "slug" : "team1" , "id" : "123" },
440440 ]
441441 },
442442 )
443443 )
444444
445- respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_slug " : "team1 " }).mock (
445+ respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_id " : "123 " }).mock (
446446 return_value = Response (
447447 201 , json = {"id" : "1234" , "name" : "demo" , "team_id" : "123" , "slug" : "demo" }
448448 )
0 commit comments