init: 博特维采购订单系统 v1.0 源码

This commit is contained in:
star
2026-09-10 16:18:15 +08:00
commit 6327ef7641
35 changed files with 4029 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
"""快速检查统计页与台账导出。"""
import http.cookiejar
import urllib.parse
import urllib.request
BASE = "http://127.0.0.1:8080"
def main():
cj = http.cookiejar.CookieJar()
op = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))
op.open(urllib.request.Request(
BASE + "/login",
data=urllib.parse.urlencode({"username": "admin", "password": "admin123"}).encode()),
timeout=30)
for path, expect in [("/stats", b"200"), ("/export/ledger", b"xlsx"),
("/orders", b"200"), ("/suppliers", b"200"),
("/materials", b"200"), ("/users", b"200"), ("/", b"200")]:
r = op.open(BASE + path, timeout=30)
data = r.read()
print(path, r.status, len(data))
assert r.status == 200, path
print("PAGES OK")
if __name__ == "__main__":
main()