Esempio n. 1
0
    def rmttest_negative_01(self):
        "Requirement Tag Description - empty reqs"
        config, req = create_parameters()

        rt = ReqDescription(config)
        with pytest.raises(RMTException) as rmte:
            rt.rewrite("Description-test", req)
            assert 2 == rmte.id()
Esempio n. 2
0
    def rmttest_negative_01(self):
        "Requirement Tag Description - empty reqs"
        config, req = create_parameters()

        rt = ReqDescription(config)
        with pytest.raises(RMTException) as rmte:
            rt.rewrite("Description-test", req)
            assert 2 == rmte.id()
Esempio n. 3
0
    def rmttest_positive_01(self):
        "Requirement Tag Description - one word Description"
        config, req = create_parameters()
        req = {"Description": RecordEntry("Description", "short")}

        rt = ReqDescription(config)
        name, value = rt.rewrite("Description-test", req)
        assert "Description" == name
        assert "short" == value.get_content()
Esempio n. 4
0
    def test_positive_01(self):
        "Requirement Tag Description - one word Description"
        config, req = create_parameters()
        req = {"Description": RecordEntry("Description", "short")}

        rt = ReqDescription(config)
        name, value = rt.rewrite("Description-test", req)
        assert (name == "Description")
        assert (value.get_content() == "short")
Esempio n. 5
0
    def rmttest_positive_02(self):
        "Requirement Tag Description - some words Description"
        config, req = create_parameters()
        d = "This are some words description."
        req = {"Description": RecordEntry("Description", d)}

        rt = ReqDescription(config)
        name, value = rt.rewrite("Description-test", req)
        assert "Description" == name
        assert d == value.get_content()
Esempio n. 6
0
    def test_negative_01(self):
        "Requirement Tag Description - empty reqs"
        config, req = create_parameters()

        rt = ReqDescription(config)
        try:
            name, value = rt.rewrite("Description-test", req)
            assert (False)
        except RMTException, rmte:
            assert (rmte.id() == 2)
Esempio n. 7
0
    def test_positive_02(self):
        "Requirement Tag Description - some words Description"
        config, req = create_parameters()
        d = "This are some words description."
        req = {"Description": RecordEntry("Description", d)}

        rt = ReqDescription(config)
        name, value = rt.rewrite("Description-test", req)
        assert (name == "Description")
        assert (value.get_content() == d)
Esempio n. 8
0
    def test_negative_01(self):
        "Requirement Tag Description - empty reqs"
        config, req = create_parameters()

        rt = ReqDescription(config)
        try:
            name, value = rt.rewrite("Description-test", req)
            assert(False)
        except RMTException, rmte:
            assert(rmte.id() == 2)
Esempio n. 9
0
    def rmttest_negative_02(self):
        "Requirement Tag Description - description much too long"
        config, req = create_parameters()
        long_text = ""
        for c in range(0, 1500):
            long_text += "A"
        req = {"Description": RecordEntry("Description", long_text)}

        rt = ReqDescription(config)
        with pytest.raises(RMTException) as rmte:
            rt.rewrite("Description-test", req)
            assert 3 == rmte.id()
Esempio n. 10
0
    def rmttest_positive_03(self):
        "Requirement Tag Description - 500 chars description"
        config, req = create_parameters()
        long_text = ""
        for c in range(0, 500):
            long_text += "A"
        req = {"Description": RecordEntry("Description", long_text)}

        rt = ReqDescription(config)
        name, value = rt.rewrite("Description-test", req)
        assert "Description" == name
        assert long_text == value.get_content()
Esempio n. 11
0
    def test_positive_03(self):
        "Requirement Tag Description - 500 chars description"
        config, req = create_parameters()
        long_text = ""
        for c in xrange(0, 500):
            long_text += "A"
        req = {"Description": RecordEntry("Description", long_text)}

        rt = ReqDescription(config)
        name, value = rt.rewrite("Description-test", req)
        assert (name == "Description")
        assert (value.get_content() == long_text)
Esempio n. 12
0
    def rmttest_negative_02(self):
        "Requirement Tag Description - description much too long"
        config, req = create_parameters()
        long_text = ""
        for c in range(0, 1500):
            long_text += "A"
        req = {"Description": RecordEntry("Description", long_text)}

        rt = ReqDescription(config)
        with pytest.raises(RMTException) as rmte:
            rt.rewrite("Description-test", req)
            assert 3 == rmte.id()
Esempio n. 13
0
    def test_negative_02(self):
        "Requirement Tag Description - description much too long"
        config, req = create_parameters()
        long_text = ""
        for c in xrange(0, 1500):
            long_text += "A"
        req = {"Description": RecordEntry("Description", long_text)}

        rt = ReqDescription(config)
        try:
            name, value = rt.rewrite("Description-test", req)
            assert (False)
        except RMTException, rmte:
            assert (rmte.id() == 3)
Esempio n. 14
0
    def test_negative_02(self):
        "Requirement Tag Description - description much too long"
        config, req = create_parameters()
        long_text = ""
        for c in xrange(0, 1500):
            long_text += "A"
        req = {"Description": RecordEntry("Description", long_text)}

        rt = ReqDescription(config)
        try:
            name, value = rt.rewrite("Description-test", req)
            assert(False)
        except RMTException, rmte:
            assert(rmte.id() == 3)