@@ -52,33 +52,30 @@ async def test_live_health_check(client):
5252 assert json == {"status" : "OK" }
5353
5454
55- @pytest .mark .skip
56- async def test_signup_reg_op (aidbox ):
57- resp = await aidbox .post ("signup/register/21.02.19/testvalue" )
58- assert resp .status == 200
59- json = await resp .json ()
55+ @pytest .mark .asyncio
56+ async def test_signup_reg_op (aidbox_client ):
57+ json = await aidbox_client .execute ("signup/register/21.02.19/testvalue" )
6058 assert json == {
6159 "success" : "Ok" ,
6260 "request" : {"date" : "21.02.19" , "test" : "testvalue" },
6361 }
6462
6563
66- @pytest .mark .skip
67- async def test_appointment_sub (sdk , aidbox ):
64+ @pytest .mark .asyncio
65+ async def test_appointment_sub (sdk , aidbox_client , safe_db ):
6866 with mock .patch .object (main , "_appointment_sub" ) as appointment_sub :
6967 f = asyncio .Future ()
7068 f .set_result ("" )
7169 appointment_sub .return_value = f
7270 was_appointment_sub_triggered = sdk .was_subscription_triggered ("Appointment" )
73- resp = await aidbox . post (
71+ resource = aidbox_client . resource (
7472 "Appointment" ,
75- json = {
73+ ** {
7674 "status" : "proposed" ,
7775 "participant" : [{"status" : "accepted" }],
78- "resourceType" : "Appointment" ,
7976 },
8077 )
81- assert resp . status == 201
78+ await resource . save ()
8279 await was_appointment_sub_triggered
8380 event = appointment_sub .call_args_list [0 ][0 ][0 ]
8481 logging .debug ("event: %s" , event )
0 commit comments