示例#1
0
    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()
示例#2
0
    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()
示例#3
0
    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()
示例#4
0
    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)
示例#5
0
    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()
示例#6
0
    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)
示例#7
0
    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)
示例#8
0
    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
示例#9
0
    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
示例#10
0
    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
示例#11
0
    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)
示例#12
0
    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