示例#1
0
    def rmttest_negative_01(self):
        "Requirement Tag Owner - no tag given"
        config, req = create_parameters()
        config.stakeholders = ["marketing", "security"]

        rt = ReqOwner(config)
        with self.assertRaises(RMTException) as rmte:
            rt.rewrite("Owner-test", req)
            self.assertEqual(10, rmte.id())
示例#2
0
    def rmttest_negative_01(self):
        "Requirement Tag Owner - no tag given"
        config, req = create_parameters()
        config.stakeholders = ["marketing", "security"]

        rt = ReqOwner(config)
        with pytest.raises(RMTException) as rmte:
            rt.rewrite("Owner-test", req)
            assert 10 == rmte.id()
示例#3
0
    def rmttest_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)
        with self.assertRaises(RMTException) as rmte:
            rt.rewrite("Owner-test", req)
            self.assertEqual(11, rmte.id())
示例#4
0
    def rmttest_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)
        with pytest.raises(RMTException) as rmte:
            rt.rewrite("Owner-test", req)
            assert 11 == rmte.id()
示例#5
0
    def test_negative_01(self):
        "Requirement Tag Owner - no tag given"
        config, req = create_parameters()
        config.stakeholders = ["marketing", "security"]

        rt = ReqOwner(config)
        try:
            name, value = rt.rewrite("Owner-test", req)
            assert(False)
        except RMTException, rmte:
            assert(rmte.id() == 10)
示例#6
0
    def test_positive_01(self):
        "Requirement Tag Owner - tag given"
        config, req = create_parameters()
        config.set_value('requirements.stakeholders',
                         ["marketing", "security"])
        req["Owner"] = RecordEntry("Owner", "marketing")

        rt = ReqOwner(config)
        name, value = rt.rewrite("Owner-test", req)
        assert(name == "Owner")
        assert(value == "marketing")
示例#7
0
    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:
            assert(rmte.id() == 11)