コード例 #1
0
ファイル: TestReqOwner.py プロジェクト: vakaras/rmtoo-old
    def test_positive_01(self):
        "Requirement Tag Owner - tag given"
        opts, config, req = create_parameters()
        config.stakeholders = ["marketing", "security"]
        req["Owner"] = RecordEntry("Owner", "marketing")

        rt = ReqOwner(opts, config)
        name, value = rt.rewrite("Owner-test", req)
        assert(name=="Owner")
        assert(value=="marketing")
コード例 #2
0
ファイル: TestReqOwner.py プロジェクト: vakaras/rmtoo-old
    def test_negative_01(self):
        "Requirement Tag Owner - no tag given"
        opts, config, req = create_parameters()
        config.stakeholders = ["marketing", "security"]

        rt = ReqOwner(opts, config)
        try:
            name, value = rt.rewrite("Owner-test", req)
            assert(False)
        except RMTException, rmte:
            assert(rmte.id()==10)
コード例 #3
0
ファイル: TestReqOwner.py プロジェクト: vakaras/rmtoo-old
    def test_negative_02(self):
        "Requirement Tag Owner - invalid tag given"
        opts, config, req = create_parameters()
        config.stakeholders = ["marketing", "security"]
        req["Owner"] = RecordEntry("Owner", "SomethingDifferent")

        rt = ReqOwner(opts, config)
        try:
            name, value = rt.rewrite("Owner-test", req)
            assert(False)
        except RMTException, rmte:
            assert(rmte.id()==11)
コード例 #4
0
ファイル: TestReqOwner.py プロジェクト: oscarpicas/rmtoo
    def test_negative_02(self):
        "Requirement Tag Owner - invalid tag given"
        config, req = create_parameters()
        config.set_value('requirements.stakeholders',
                         ["marketing", "security"])
        req["Owner"] = RecordEntry("Owner", "SomethingDifferent")

        rt = ReqOwner(config)
        try:
            name, value = rt.rewrite("Owner-test", req)
            assert(False)
        except RMTException, rmte:
            print("SKDJFHSDJKFH [%s]" % rmte.id())
            assert(rmte.id() == 11)