Exemplo n.º 1
0
    def test_positive_01(self):
        "Requirement Tag Effort Estimation - no tag given"
        config, req = create_parameters()

        rt = ReqEffortEst(config)
        name, value = rt.rewrite("EffortEstimation-test", req)
        assert(name == "Effort estimation")
        assert(value == None)
Exemplo n.º 2
0
    def test_positive_02(self):
        "Requirement Tag Effort Estimation - tag given with all valid numbers"
        config, req = create_parameters()

        for i in ReqEffortEst.valid_values:
            req["Effort estimation"] = RecordEntry("Effort estimation", str(i))
            rt = ReqEffortEst(config)
            name, value = rt.rewrite("EffortEstimation-test", req)
            assert(name == "Effort estimation")
            assert(value == i)
Exemplo n.º 3
0
    def test_negative_01(self):
        "Requirement Tag Effort Estimation - tag given with invalid numbers"
        config, req = create_parameters()

        for i in [4, 6, 7, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 22,
                  23, 24, 25, 26, 27, 28, 29, 30, 31, 32]:
            req["Effort estimation"] = RecordEntry("Effort estimation", str(i))
            rt = ReqEffortEst(config)
            try:
                name, value = rt.rewrite("EffortEstimation-test", req)
                assert(False)
            except RMTException, rmte:
                assert(rmte.id() == 4)