hisham-cmd commited on
Commit
90de406
·
verified ·
1 Parent(s): 717cfc8

Delete test_categories_api.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. test_categories_api.py +0 -23
test_categories_api.py DELETED
@@ -1,23 +0,0 @@
1
- import requests
2
- import json
3
-
4
- def test_categories():
5
- base_url = "http://localhost:8000/api"
6
- try:
7
- response = requests.get(f"{base_url}/categories")
8
- if response.status_code == 200:
9
- data = response.json()
10
- if data['isSuccess']:
11
- items = data['value']['items']
12
- print(f"Total categories returned: {len(items)}")
13
- for item in items:
14
- print(f"- {item['name_en']} (ID: {item['id']}, Parent: {item['parent_id']})")
15
- else:
16
- print(f"API Error: {data['error']}")
17
- else:
18
- print(f"HTTP Error: {response.status_code}")
19
- except Exception as e:
20
- print(f"Connection Error: {e}")
21
-
22
- if __name__ == "__main__":
23
- test_categories()