Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-X-Net committed Feb 24, 2024
1 parent 1564e42 commit 24f753f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions code/default/launcher/tests/test_web_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from unittest import TestCase
import json

import simple_http_client


class TestAPi(TestCase):
def setUp(self):
self.base_url = "http://localhost:8085"

def test_set_proxy_applist(self):
url = self.base_url + "/set_proxy_applist"
headers = {
"Content-Type": "application/json"
}
info = {
'proxy_by_app': "true",
'enabled_app_list[]': [
"com.google.android.youtube"
]
}
dat = json.dumps(info)

res = simple_http_client.request("POST", url, headers=headers, body=dat)
print(res.text)

0 comments on commit 24f753f

Please sign in to comment.