fix: update ntfy tests for SSE API (reconnect_delay)

This commit is contained in:
2026-03-15 15:07:49 -07:00
parent 1ac2dec3b0
commit 9ae4dc2b07
2 changed files with 4 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ import json
import threading import threading
import time import time
import urllib.request import urllib.request
from urllib.parse import urlparse, parse_qs, urlencode, urlunparse from urllib.parse import parse_qs, urlencode, urlparse, urlunparse
class NtfyPoller: class NtfyPoller:

View File

@@ -15,15 +15,15 @@ class TestNtfyPollerInit:
"""Default values are set correctly.""" """Default values are set correctly."""
poller = NtfyPoller("http://example.com/topic") poller = NtfyPoller("http://example.com/topic")
assert poller.topic_url == "http://example.com/topic" assert poller.topic_url == "http://example.com/topic"
assert poller.poll_interval == 15 assert poller.reconnect_delay == 5
assert poller.display_secs == 30 assert poller.display_secs == 30
def test_init_custom_values(self): def test_init_custom_values(self):
"""Custom values are set correctly.""" """Custom values are set correctly."""
poller = NtfyPoller( poller = NtfyPoller(
"http://example.com/topic", poll_interval=5, display_secs=60 "http://example.com/topic", reconnect_delay=10, display_secs=60
) )
assert poller.poll_interval == 5 assert poller.reconnect_delay == 10
assert poller.display_secs == 60 assert poller.display_secs == 60