def OnNewTestCase(self, event): dlg = TestCaseNameDialog(self.controller) if dlg.ShowModal() == wx.ID_OK: self.controller.execute(AddTestCase(dlg.get_name())) dlg.Destroy()
def test_creation(self): test_ctrl = file_controller().create_test('A test') dlg = TestCaseNameDialog(test_ctrl) assert_equal(dlg.get_name(), '')
def test_get_name_item_is_not_none(self): test_ctrl = file_controller().create_test('A test') dlg = TestCaseNameDialog(test_ctrl, item=test_ctrl.data) assert_equal(dlg.get_name(), 'A test')