revise_chip_refresh
Change-Id: I8c3e5edecbd31f91519b5671686b2d72a88693e0
diff --git a/TRM/back/tests/__init__.py b/TRM/back/tests/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TRM/back/tests/__init__.py
diff --git a/TRM/back/tests/__pycache__/__init__.cpython-312.pyc b/TRM/back/tests/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000..48c8068
--- /dev/null
+++ b/TRM/back/tests/__pycache__/__init__.cpython-312.pyc
Binary files differ
diff --git a/TRM/back/tests/__pycache__/test_app.cpython-312-pytest-7.4.4.pyc b/TRM/back/tests/__pycache__/test_app.cpython-312-pytest-7.4.4.pyc
new file mode 100644
index 0000000..9a2b7de
--- /dev/null
+++ b/TRM/back/tests/__pycache__/test_app.cpython-312-pytest-7.4.4.pyc
Binary files differ
diff --git a/TRM/back/tests/test_app.py b/TRM/back/tests/test_app.py
new file mode 100644
index 0000000..3ed6bf9
--- /dev/null
+++ b/TRM/back/tests/test_app.py
@@ -0,0 +1,41 @@
+import requests
+url = 'http://127.0.0.1:5713/'
+
+def test_get_postlist():
+ print()
+ urlx=url+'apostlist'
+ payload = {
+ 'userid': 3
+ }
+ headers = {'Content-Type': 'application/json'}
+
+ resp = requests.get(urlx, json=payload, headers=headers)
+ # print(resp.status_code)
+ print(resp.json())
+
+def test_get_post():
+ print()
+ urlx=url+'agetpost'
+ payload = {
+ 'userid': 3,
+ 'postid': 21
+ }
+ headers = {'Content-Type': 'application/json'}
+
+ resp = requests.get(urlx, json=payload, headers=headers)
+ # print(resp.status_code)
+ print(resp.json())
+
+def test_review_post():
+ print()
+ urlx=url+'areview'
+ payload = {
+ 'userid': 3,
+ 'postid': 21,
+ 'status': 'rejected'
+ }
+ headers = {'Content-Type': 'application/json'}
+
+ resp = requests.get(urlx, json=payload, headers=headers)
+ # print(resp.status_code)
+ print(resp.json())
\ No newline at end of file