def test_delete_validation(stc): stc_sys = CStcSystem.Instance() project = stc_sys.GetObject("Project") ctor = CScriptableCreator() meth_man = meth_man_utils.get_meth_manager() meth = ctor.Create("StmMethodology", meth_man) tc1 = ctor.Create("StmTestCase", meth) tc2 = ctor.Create("StmTestCase", meth) assert tc1 assert tc2 # Note that StmMethodologyManager lives under system. # ProcessInputHandleVec will return nothing here: res = DelCmd.validate(project.GetObjectHandle()) assert res == "Invalid Test Methodology" # ProcessInputHandleVec returns two test cases here: res = DelCmd.validate(tc1.GetObjectHandle()) assert res == "Invalid Test Methodology" # Valid case (both checked here to prevent pep8 errors) res = DelCmd.validate(meth.GetObjectHandle()) assert res == ""
def test_reset(): res = DelCmd.reset() assert res is True