source: orange/Orange/OrangeCanvas/application/tests/test_schemeinfo.py @ 11118:dfe9184ac887

Revision 11118:dfe9184ac887, 688 bytes checked in by Ales Erjavec <ales.erjavec@…>, 18 months ago (diff)

Added a scheme info editor.

Line 
1from ...scheme import Scheme
2from ..schemeinfo import SchemeInfoDialog
3from ...gui import test
4
5
6class TestSchemeInfo(test.QAppTestCase):
7    def test_scheme_info(self):
8        scheme = Scheme(title="A Scheme", description="A String\n")
9        dialog = SchemeInfoDialog()
10        dialog.setScheme(scheme)
11
12        status = dialog.exec_()
13
14        if status == dialog.Accepted:
15            self.assertEqual(scheme.title.strip(),
16                             unicode(dialog.editor.name_edit.text()).strip())
17            self.assertEqual(scheme.description,
18                             unicode(dialog.editor.desc_edit \
19                                           .toPlainText()).strip())
Note: See TracBrowser for help on using the repository browser.