Source

ropemacs / ropemacstest.py

The trunk branch has multiple heads

Diff from to

File ropemacstest.py

 import unittest
 
-from ropemacs import config
+from ropemacs import dialog
 
 
 class ConfigTest(unittest.TestCase):
         super(ConfigTest, self).tearDown()
 
     def test_trivial_case(self):
-        action, confs = config.show_dialog(_MockAskConfig(['done']), ['done'])
+        action, confs = dialog.show_dialog(_MockAskConfig(['done']), ['done'])
         self.assertEquals('done', action)
         self.assertEquals({}, confs)
 
     def test_asking_normal_configs(self):
-        confs = {'name': config.Data()}
+        confs = {'name': dialog.Data()}
         minibuffer = _MockAskConfig(['value', 'done'])
-        action, result = config.show_dialog(minibuffer,
+        action, result = dialog.show_dialog(minibuffer,
                                             ['done', 'cancel'], confs)
         self.assertEquals({'name': 'value'}, result)
         self.assertEquals('done', action)
 
     def test_optional_confs(self):
-        optionals = {'name': config.Data()}
+        optionals = {'name': dialog.Data()}
         minibuffer = _MockAskConfig(['done'])
-        action, result = config.show_dialog(minibuffer, ['done', 'cancel'],
+        action, result = dialog.show_dialog(minibuffer, ['done', 'cancel'],
                                             optionals=optionals)
         self.assertEquals(None, result.get('name', None))
         self.assertEquals('done', action)
 
     def test_optional_confs2(self):
-        optionals = {'name': config.Data()}
+        optionals = {'name': dialog.Data()}
         minibuffer = _MockAskConfig(['name', 'value', 'done'])
-        action, result = config.show_dialog(minibuffer, ['done', 'cancel'],
+        action, result = dialog.show_dialog(minibuffer, ['done', 'cancel'],
                                             optionals=optionals)
         self.assertEquals({'name': 'value'}, result)
         self.assertEquals('done', action)