mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-10-25 08:11:24 +00:00
Tests - Don't assert the input type of the restock threshold field, WTForms 3.3 renders FloatField as type="number"
wtforms~=3.2 now installs 3.3.0, which changed FloatField's widget from a text input to a number input, so test_itemprop_percent_threshold failed on every branch. The value is still saved and rendered correctly; only check that. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ce91b85220
commit
8f4071e970
1 file changed
+4
-1
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
import re
|
||||
import os
|
||||
import time
|
||||
|
||||
@@ -339,7 +340,9 @@ def test_itemprop_percent_threshold(client, live_server, measure_memory_usage, d
|
||||
# And back again
|
||||
live_server.app.config['DATASTORE'].data['watching'][uuid]['processor'] = 'restock_diff'
|
||||
res = client.get(url_for("ui.ui_edit.edit_page", uuid=uuid))
|
||||
assert b'type="text" value="5.05"' in res.data
|
||||
# Don't assert the input type: WTForms 3.3 renders FloatField as type="number", older versions as type="text"
|
||||
threshold_input = re.search(rb'<input[^>]*name="processor_config_restock_diff-price_change_threshold_percent"[^>]*>', res.data)
|
||||
assert threshold_input and b'value="5.05"' in threshold_input.group(0)
|
||||
|
||||
delete_all_watches(client)
|
||||
|
||||
|
||||
Reference in new issue
Block a user