Ejemplo n.º 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())
Ejemplo n.º 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()
Ejemplo n.º 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())
Ejemplo n.º 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()
Ejemplo n.º 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)
Ejemplo n.º 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")
Ejemplo n.º 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)