Esempio n. 1
0
 def test_click_args(self):
     root = Tk()
     root.withdraw()
     dialog = query.CustomRun(root, 'Title', _utest=True)
     dialog.entry.insert(0, 'okay')
     dialog.button_ok.invoke()
     self.assertEqual(dialog.result, (['okay'], True))
     root.destroy()
Esempio n. 2
0
 def test_click_args(self):
     root = Tk()
     root.withdraw()
     dialog =  query.CustomRun(root, 'Title',
                               cli_args=['a', 'b=1'], _utest=True)
     self.assertEqual(dialog.entry.get(), 'a b=1')
     dialog.entry.insert(END, ' c')
     dialog.button_ok.invoke()
     self.assertEqual(dialog.result, (['a', 'b=1', 'c'], True))
     root.destroy()