File tree 4 files changed +9
-9
lines changed
src/simcore_service_webserver/wallets
tests/unit/with_dbs/03/wallets 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,8 @@ async def update_wallet(
70
70
user_id : UserID ,
71
71
wallet_id : WalletID ,
72
72
name : str ,
73
- description : str ,
74
- thumbnail : str ,
73
+ description : str | None ,
74
+ thumbnail : str | None ,
75
75
status : WalletStatus ,
76
76
) -> WalletGet :
77
77
wallet : UserWalletDB = await db .get_wallet_for_user (
Original file line number Diff line number Diff line change @@ -180,8 +180,8 @@ async def update_wallet(
180
180
app : web .Application ,
181
181
wallet_id : WalletID ,
182
182
name : str ,
183
- description : str ,
184
- thumbnail : str ,
183
+ description : str | None ,
184
+ thumbnail : str | None ,
185
185
status : WalletStatus ,
186
186
) -> WalletDB :
187
187
async with get_database_engine (app ).acquire () as conn :
Original file line number Diff line number Diff line change @@ -111,8 +111,8 @@ async def list_wallets(request: web.Request):
111
111
112
112
class _PutWalletBodyParams (BaseModel ):
113
113
name : str
114
- description : str
115
- thumbnail : str
114
+ description : str | None
115
+ thumbnail : str | None
116
116
status : WalletStatus
117
117
118
118
class Config :
Original file line number Diff line number Diff line change @@ -68,15 +68,15 @@ async def test_wallets_full_workflow(
68
68
f"{ url } " ,
69
69
json = {
70
70
"name" : "My first wallet" ,
71
- "description" : "New description" ,
71
+ "description" : None ,
72
72
"thumbnail" : "New thumbnail" ,
73
73
"status" : "INACTIVE" ,
74
74
},
75
75
)
76
76
data , _ = await assert_status (resp , web .HTTPOk )
77
77
assert data ["wallet_id" ] == added_wallet ["wallet_id" ]
78
78
assert data ["name" ] == "My first wallet"
79
- assert data ["description" ] == "New description"
79
+ assert data ["description" ] == None
80
80
assert data ["thumbnail" ] == "New thumbnail"
81
81
assert data ["status" ] == "INACTIVE"
82
82
assert arrow .get (data ["modified" ]) > store_modified_field
@@ -88,7 +88,7 @@ async def test_wallets_full_workflow(
88
88
assert len (data ) == 1
89
89
assert data [0 ]["wallet_id" ] == added_wallet ["wallet_id" ]
90
90
assert data [0 ]["name" ] == "My first wallet"
91
- assert data [0 ]["description" ] == "New description"
91
+ assert data [0 ]["description" ] == None
92
92
assert data [0 ]["thumbnail" ] == "New thumbnail"
93
93
assert data [0 ]["status" ] == "INACTIVE"
94
94
assert arrow .get (data [0 ]["modified" ]) > store_modified_field
You can’t perform that action at this time.
0 commit comments