remove /api support

This commit is contained in:
2026-07-31 14:19:48 +08:00
parent 46c69607c5
commit 6330b99860
11 changed files with 75 additions and 67 deletions
+2 -2
View File
@@ -30,12 +30,12 @@ class DeviceHeartbeatTests(unittest.TestCase):
requests_module.post = post
api_module = types.ModuleType("api")
api_module.data_record_url = "https://server.example/api"
api_module.data_record_url = "https://server.example"
api_module.the_folder = "company/line"
with patch.dict(sys.modules, {"requests": requests_module, "api": api_module}):
timestamp = HEARTBEAT.heartbeat_device(timeout=7)
self.assertEqual(timestamp, "2026-07-28T00:00:00.000Z")
self.assertEqual(calls, [("https://server.example/api", {
self.assertEqual(calls, [("https://server.example", {
"type": "deviceHeartbeat", "deviceId": "company/line"
}, 7)])