File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -15,3 +15,27 @@ def test_health():
15
15
response = client .get ("/health" )
16
16
assert response .status_code == 200
17
17
assert response .json () == {"status" : "ok" }
18
+
19
+
20
+ def test_config ():
21
+ response = client .get ("/config" )
22
+ assert response .status_code == 200
23
+ assert response .json () == {
24
+ "wren_engine_endpoint" : "http://localhost:8080" ,
25
+ "diagnose" : False ,
26
+ }
27
+
28
+
29
+ def test_update_diagnose ():
30
+ response = client .patch ("/config" , json = {"diagnose" : True })
31
+ assert response .status_code == 200
32
+ assert response .json ()["diagnose" ] is True
33
+ response = client .get ("/config" )
34
+ assert response .status_code == 200
35
+ assert response .json ()["diagnose" ] is True
36
+ response = client .patch ("/config" , json = {"diagnose" : False })
37
+ assert response .status_code == 200
38
+ assert response .json ()["diagnose" ] is False
39
+ response = client .get ("/config" )
40
+ assert response .status_code == 200
41
+ assert response .json ()["diagnose" ] is False
You can’t perform that action at this time.
0 commit comments