mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-01 22:35:21 +03:00
[core] prtester fix for optgroups (#2896)
This commit is contained in:
parent
6c52e9bbc6
commit
e3dad86bca
1 changed files with 7 additions and 4 deletions
11
.github/prtester.py
vendored
11
.github/prtester.py
vendored
|
@ -54,12 +54,15 @@ def testBridges(bridges,status):
|
||||||
listname = listing.get('name')
|
listname = listing.get('name')
|
||||||
if 'optgroup' in listing.contents[0].name:
|
if 'optgroup' in listing.contents[0].name:
|
||||||
listing = list(itertools.chain.from_iterable(listing))
|
listing = list(itertools.chain.from_iterable(listing))
|
||||||
|
firstselectionentry = 1
|
||||||
for selectionentry in listing:
|
for selectionentry in listing:
|
||||||
if 'selected' in selectionentry.attrs:
|
if firstselectionentry:
|
||||||
selectionvalue = selectionentry.get('value')
|
selectionvalue = selectionentry.get('value')
|
||||||
break
|
firstselectionentry = 0
|
||||||
if selectionvalue == '':
|
else:
|
||||||
selectionvalue = listing.contents[0].get('value')
|
if 'selected' in selectionentry.attrs:
|
||||||
|
selectionvalue = selectionentry.get('value')
|
||||||
|
break
|
||||||
formstring = formstring + '&' + listname + '=' + selectionvalue
|
formstring = formstring + '&' + listname + '=' + selectionvalue
|
||||||
if not errormessages:
|
if not errormessages:
|
||||||
# if all example/default values are present, form the full request string, run the request, replace the static css
|
# if all example/default values are present, form the full request string, run the request, replace the static css
|
||||||
|
|
Loading…
Add table
Reference in a new issue