@@ -0,0 +1,1259 @@
+'''%0A%09Test menu creation%0A'''%0A%0Aimport unittest%0Afrom wirecurly.configuration import menu%0Afrom nose import tools%0A%0A%0Aclass testMenuCreation(unittest.TestCase):%0A%09'''%0A%09%09Test menu creation%0A%09'''%0A%0A%09def setUp(self):%0A%09%09'''%0A%09%09%09menu fixtures for tests%0A%09%09'''%0A%0A%09%09self.menu = menu.Menu('on_hours')%0A%09%09%0A%09def test_menu_dict_ok(self):%0A%09%09'''%0A%09%09%09Test that menu is properly serialized %0A%09%09'''%0A%09%09assert isinstance(self.menu.todict(), dict)%0A%0A%09def test_adding_attr(self):%0A%09%09'''%0A%09%09%09Test if an attr is properly add to a menu%0A%09%09'''%0A%09%09self.menu.addAttr('digit-len','4') %0A%09%09assert self.menu.get('digit-len') == '4'%0A%0A%09@tools.raises(ValueError)%0A%09def test_adding_existing_attr(self):%0A%09%09'''%0A%09%09%09Test adding an existing attr%0A%09%09'''%0A%09%09self.menu.addAttr('digit-len','4')%0A%09%09self.menu.addAttr('digit-len','4')%0A%0A%09def test_adding_entry(self):%0A%09%09'''%0A%09%09%09Test if an entry is properly add to a menu%0A%09%09'''%0A%09%09self.menu.addEntry('menu-exec-app','1','transfer 1001 XML default') %0A%09%09assert self.menu.getEntry('menu-exec-app','1') == 'transfer 1001 XML default'%0A%0A%09@tools.raises(ValueError)%0A%09def test_adding_existing_entry(self):%0A%09%09'''%0A%09%09%09Test adding an existing entry%0A%09%09'''%0A%09%09self.menu.addEntry('menu-exec-app','1','transfer 1001 XML default')%0A%09%09self.menu.addEntry('menu-exec-app','1','transfer 1001 XML default')%0A%09%09

Add tests for IVR menu