kopia lustrzana https://github.com/dgtlmoon/changedetection.io
Strengthen the notification tests
rodzic
c396cf8176
commit
9e6c2bf3e0
|
@ -52,10 +52,13 @@ def test_check_notification(client, live_server):
|
||||||
# Because we hit 'send test notification on save'
|
# Because we hit 'send test notification on save'
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
|
notification_submission = None
|
||||||
|
|
||||||
# Verify what was sent as a notification, this file should exist
|
# Verify what was sent as a notification, this file should exist
|
||||||
with open("test-datastore/notification.txt", "r") as f:
|
with open("test-datastore/notification.txt", "r") as f:
|
||||||
notification_submission = f.read()
|
notification_submission = f.read()
|
||||||
# Did we see the URL that had a change, in the notification?
|
# Did we see the URL that had a change, in the notification?
|
||||||
|
|
||||||
assert test_url in notification_submission
|
assert test_url in notification_submission
|
||||||
|
|
||||||
os.unlink("test-datastore/notification.txt")
|
os.unlink("test-datastore/notification.txt")
|
||||||
|
@ -75,10 +78,12 @@ def test_check_notification(client, live_server):
|
||||||
|
|
||||||
assert bytes("just now".encode('utf-8')) in res.data
|
assert bytes("just now".encode('utf-8')) in res.data
|
||||||
|
|
||||||
|
notification_submission=None
|
||||||
# Verify what was sent as a notification
|
# Verify what was sent as a notification
|
||||||
with open("test-datastore/notification.txt", "r") as f:
|
with open("test-datastore/notification.txt", "r") as f:
|
||||||
notification_submission = f.read()
|
notification_submission = f.read()
|
||||||
# Did we see the URL that had a change, in the notification?
|
# Did we see the URL that had a change, in the notification?
|
||||||
|
|
||||||
assert test_url in notification_submission
|
assert test_url in notification_submission
|
||||||
|
|
||||||
# Re #65 - did we see our foobar.com BASE_URL ?
|
# Re #65 - did we see our foobar.com BASE_URL ?
|
||||||
|
|
Ładowanie…
Reference in New Issue