def rmttest_negative_01(self): "Requirement Tag Status - no tag given" config, req = create_parameters() rt = ReqStatus(config) with pytest.raises(RMTException) as rmte: rt.rewrite("Status-test", req) assert 16 == rmte.get_id()
def rmttest_negative_02(self): "Requirement Tag Status - invalid tag given" config, req = create_parameters() req["Status"] = RecordEntry("Status", "dasjibtedjarnich") rt = ReqStatus(config) with pytest.raises(RMTException) as rmte: rt.rewrite("Status-test", req) assert 91 == rmte.get_id()
def rmttest_positive_01(self): "Requirement Tag Status - tag given 'not done'" config, req = create_parameters() req["Status"] = RecordEntry("Status", "not done") rt = ReqStatus(config) name, value = rt.rewrite("Status-test", req) assert "Status" == name assert isinstance(value, RequirementStatusNotDone)
def test_negative_01(self): "Requirement Tag Status - no tag given" config, req = create_parameters() rt = ReqStatus(config) try: name, value = rt.rewrite("Status-test", req) assert (False) except RMTException, rmte: assert (rmte.id() == 16)
def test_negative_01(self): "Requirement Tag Status - no tag given" config, req = create_parameters() rt = ReqStatus(config) try: name, value = rt.rewrite("Status-test", req) assert False except RMTException, rmte: assert rmte.id() == 16
def rmttest_positive_02(self): "Requirement Tag Status - tag given 'finished'" config, req = create_parameters() req["Status"] = RecordEntry("Status", "finished") rt = ReqStatus(config) name, value = rt.rewrite("Status-test", req) assert "Status" == name assert isinstance(value, RequirementStatusFinished) assert value.get_person() is None assert value.get_duration() is None
def test_negative_02(self): "Requirement Tag Status - invalid tag given" config, req = create_parameters() req["Status"] = RecordEntry("Status", "dasjibtedjarnich") rt = ReqStatus(config) try: name, value = rt.rewrite("Status-test", req) assert (False) except RMTException, rmte: assert (rmte.id() == 91)
def test_negative_02(self): "Requirement Tag Status - invalid tag given" config, req = create_parameters() req["Status"] = RecordEntry("Status", "dasjibtedjarnich") rt = ReqStatus(config) try: name, value = rt.rewrite("Status-test", req) assert False except RMTException, rmte: assert rmte.id() == 91