Ejemplo n.º 1
0
    def test_positive_01(self):
        "Requirement Tag Invented by - tag given"
        opts, config, req = create_parameters()
        config.inventors = ["meinereiner", "keinerseiner"]
        req["Invented by"] = RecordEntry("Invented by", "meinereiner")

        rt = ReqInventedBy(opts, config)
        name, value = rt.rewrite("InventedBy-test", req)
        assert(name=="Invented by")
        assert(value=="meinereiner")
Ejemplo n.º 2
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)
Ejemplo n.º 3
0
    def test_negative_02(self):
        "Requirement Tag Invented by - invalid tag given"
        opts, config, req = create_parameters()
        config.inventors = ["meinereiner", "keinerseiner"]
        req["Invented by"] = RecordEntry("Invented by", "MeinNameIstHase")

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