Ejemplo n.º 1
0
 def testSelectInDataMode(self):
     entry = ProxyComboEntry()
     entry.prefill([('one', 1), ('two', 2)])
     entry.select(2)
     self.assertEqual(entry.get_selected(), 2)
Ejemplo n.º 2
0
 def testGetSelectedInDataMode(self):
     entry = ProxyComboEntry()
     self.assertEqual(entry.get_selected(), None)
     entry.prefill([('one', 1), ('two', 2)])
     entry.select_item_by_label('two')
     self.assertEqual(entry.get_selected(), 2)
Ejemplo n.º 3
0
 def testSelectInTextMode(self):
     entry = ProxyComboEntry()
     entry.prefill(['one', 'two'])
     entry.select('two')
     self.assertEqual(entry.get_selected(), 'two')
Ejemplo n.º 4
0
 def testGetSelectedInTextMode(self):
     entry = ProxyComboEntry()
     self.assertEqual(entry.get_selected(), None)
     entry.prefill(['one', 'two'])
     entry.select_item_by_label('two')
     self.assertEqual(entry.get_selected(), 'two')