예제 #1
0
 def test_get_selected_option__return_first(self):
     select = Select()
     option1 = Option("L1")
     option1.selected = True
     option2 = Option("L2")
     option2.selected = True
     select.append(option1)
     select.append(option2)
     assert_is(option1, select.selected_option)
예제 #2
0
 def test_get_selected_option__return_first(self):
     select = Select()
     option1 = Option("L1")
     option1.selected = True
     option2 = Option("L2")
     option2.selected = True
     select.append(option1)
     select.append(option2)
     assert_is(option1, select.selected_option)
예제 #3
0
 def test_set_selected_option__string_children(self):
     select = Select()
     select.append("String Content")
     option = select.create_option("L1")
     select.selected_option = option
예제 #4
0
 def test_get_selected_option__non_option_elements(self):
     select = Select()
     select.append("String Content")
     assert_is_none(select.selected_option)
예제 #5
0
 def test_set_selected_option__string_children(self):
     select = Select()
     select.append("String Content")
     option = select.create_option("L1")
     select.selected_option = option
예제 #6
0
 def test_get_selected_option__non_option_elements(self):
     select = Select()
     select.append("String Content")
     assert_is_none(select.selected_option)