Skip to content

ItemControl.selected = True fails if selected is already True #40

@mgedmin

Description

@mgedmin

Given a form like

            <select multiple name="select-multiple">
              <option value="foo" />
              <option value="bar" />
              <option value="baz" />
            </select>

if you find the ItemControl for foo (call it item) and set item.selected = True twice in a row, zope.testbrowser ends up calling WebTest's MultipleSelect.value__set() with a list of values that contains duplicates, which in turn causes WebTest to raise

ValueError: Option(s) u'foo' not found (from u'foo', u'bar', u'baz')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions