def test_layoutSelect_textSelected(self): """ layoutSelect returns good value for text type """ flexmock(presentation_environment_TW.presentation_generator_TW. PresentationGenerator).should_receive('__new__').once() dummyPres = presentation_environment_TW.Presentation( 'PYTHON-Environment.pptx', 'PYTHON-Course.template') self.assertEqual(dummyPres.layoutSelect('text'), 5)
def test_bad_layoutSelect_badValue(self): """ layoutSelect wrong format """ flexmock(presentation_environment_TW.presentation_generator_TW. PresentationGenerator).should_receive('__new__').once() dummyPres = presentation_environment_TW.Presentation( 'PYTHON-Environment.pptx', 'PYTHON-Course.template') data1 = "XXX" with self.assertRaises(ValueError): result = dummyPres.layoutSelect(data1)