@@ -101,8 +101,8 @@ def test_shows_teams(
101
101
200 ,
102
102
json = {
103
103
"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" },
106
106
]
107
107
},
108
108
)
@@ -130,8 +130,8 @@ def test_asks_for_app_name_after_team(
130
130
200 ,
131
131
json = {
132
132
"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" },
135
135
]
136
136
},
137
137
)
@@ -158,13 +158,13 @@ def test_creates_app_on_backend(
158
158
200 ,
159
159
json = {
160
160
"data" : [
161
- {"name" : "team1" , "slug" : "team1" },
161
+ {"name" : "team1" , "slug" : "team1" , "id" : "123" },
162
162
]
163
163
},
164
164
)
165
165
)
166
166
167
- respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_slug " : "team1 " }).mock (
167
+ respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_id " : "123 " }).mock (
168
168
return_value = Response (
169
169
201 ,
170
170
json = {"id" : "1234" , "name" : "demo" , "team_id" : "123" , "slug" : "demo" },
@@ -192,13 +192,13 @@ def test_creates_and_uploads_deployment_then_fails(
192
192
200 ,
193
193
json = {
194
194
"data" : [
195
- {"name" : "team1" , "slug" : "team1" },
195
+ {"name" : "team1" , "slug" : "team1" , "id" : "123" },
196
196
]
197
197
},
198
198
)
199
199
)
200
200
201
- respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_slug " : "team1 " }).mock (
201
+ respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_id " : "123 " }).mock (
202
202
return_value = Response (
203
203
201 , json = {"id" : "1234" , "name" : "demo" , "team_id" : "123" , "slug" : "demo" }
204
204
)
@@ -271,13 +271,13 @@ def test_exists_successfully_when_deployment_is_done(
271
271
200 ,
272
272
json = {
273
273
"data" : [
274
- {"name" : "team1" , "slug" : "team1" },
274
+ {"name" : "team1" , "slug" : "team1" , "id" : "123" },
275
275
]
276
276
},
277
277
)
278
278
)
279
279
280
- respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_slug " : "team1 " }).mock (
280
+ respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_id " : "123 " }).mock (
281
281
return_value = Response (
282
282
201 , json = {"id" : "1234" , "name" : "demo" , "team_id" : "123" , "slug" : "demo" }
283
283
)
@@ -346,7 +346,7 @@ def test_exists_successfully_when_deployment_is_done_when_app_is_configured(
346
346
config_path = tmp_path / ".fastapi" / "cloud.json"
347
347
348
348
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" }' )
350
350
351
351
respx_mock .get ("/apps/1234" ).mock (
352
352
return_value = Response (200 , json = {"slug" : "demo" , "id" : "1234" })
@@ -413,7 +413,7 @@ def test_shows_error_when_app_does_not_exist(
413
413
config_path = tmp_path / ".fastapi" / "cloud.json"
414
414
415
415
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" }' )
417
417
418
418
respx_mock .get ("/apps/some-random-id" ).mock (return_value = Response (404 ))
419
419
@@ -436,13 +436,13 @@ def test_can_skip_waiting(
436
436
200 ,
437
437
json = {
438
438
"data" : [
439
- {"name" : "team1" , "slug" : "team1" },
439
+ {"name" : "team1" , "slug" : "team1" , "id" : "123" },
440
440
]
441
441
},
442
442
)
443
443
)
444
444
445
- respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_slug " : "team1 " }).mock (
445
+ respx_mock .post ("/apps/" , json = {"name" : "demo" , "team_id " : "123 " }).mock (
446
446
return_value = Response (
447
447
201 , json = {"id" : "1234" , "name" : "demo" , "team_id" : "123" , "slug" : "demo" }
448
448
)
0 commit comments