Esempio n. 1
0
    def rmttest_negative_01(self):
        "Requirement Tag Invented by - no tag given"
        config, req = create_parameters()
        config.inventors = ["meinereiner", "keinerseiner"]

        rt = ReqInventedBy(config)
        with pytest.raises(RMTException) as rmte:
            rt.rewrite("InventedBy-test", req)
            assert 5 == rmte.id()
Esempio n. 2
0
    def rmttest_negative_02(self):
        "Requirement Tag Invented by - invalid tag given"
        config, req = create_parameters()
        config.set_value('requirements.inventors',
                         ["meinereiner", "keinerseiner"])
        req["Invented by"] = RecordEntry("Invented by", "MeinNameIstHase")

        rt = ReqInventedBy(config)
        with pytest.raises(RMTException) as rmte:
            rt.rewrite("InventedBy-test", req)
            assert 6 == rmte.id()
Esempio n. 3
0
    def rmttest_positive_01(self):
        "Requirement Tag Invented by - tag given"
        config, req = create_parameters()
        config.set_value('requirements.inventors',
                         ["meinereiner", "keinerseiner"])
        req["Invented by"] = RecordEntry("Invented by", "meinereiner")

        rt = ReqInventedBy(config)
        name, value = rt.rewrite("InventedBy-test", req)
        assert "Invented by" == name
        assert "meinereiner" == value
Esempio n. 4
0
    def test_negative_01(self):
        "Requirement Tag Invented by - no tag given"
        config, req = create_parameters()
        config.inventors = ["meinereiner", "keinerseiner"]

        rt = ReqInventedBy(config)
        try:
            name, value = rt.rewrite("InventedBy-test", req)
            assert(False)
        except RMTException, rmte:
            assert(rmte.id() == 5)
Esempio n. 5
0
    def test_negative_02(self):
        "Requirement Tag Invented by - invalid tag given"
        config, req = create_parameters()
        config.set_value('requirements.inventors',
                         ["meinereiner", "keinerseiner"])
        req["Invented by"] = RecordEntry("Invented by", "MeinNameIstHase")

        rt = ReqInventedBy(config)
        try:
            name, value = rt.rewrite("InventedBy-test", req)
            assert(False)
        except RMTException, rmte:
            assert(rmte.id() == 6)