Beispiel #1
0
    def test_processrunner_contentwrapper_length_over_threshold(self):
        content = self.contentOverThreshold
        cw = ContentWrapper(content)

        self.assertEqual(
            len(content), len(cw),
            "ContentWrapper is not returning the right length: original {}, returned {}"
            .format(len(content), len(cw)))
Beispiel #2
0
    def test_processrunner_contentwrapper_type_over_threshold(self):
        content = self.contentOverThreshold
        cw = ContentWrapper(content)
        expectedType = "FILE"
        actualType = ContentWrapper.TYPES.reverse_mapping[cw.type]

        self.assertEqual(
            expectedType, actualType,
            "ContentWrapper type isn't what is expected: expected {}, actual {}"
            .format(expectedType, actualType))
Beispiel #3
0
    def test_processrunner_contentwrapper_double_read_under_threshold(self):
        content = self.contentUnderThreshold
        cw = ContentWrapper(content)

        read1 = cw.value
        read2 = cw.value

        self.assertEqual(
            content, read2,
            "ContentWrapper is not returning the right value on second read")
Beispiel #4
0
    def test_processrunner_contentwrapper_value_over_threshold(self):
        content = self.contentOverThreshold
        cw = ContentWrapper(content)

        self.assertEqual(content, cw,
                         "ContentWrapper is not returning the right value")
Beispiel #5
0
    def test_processrunner_contentwrapper_value_16m(self):
        content = self.content16m
        cw = ContentWrapper(content)

        self.assertEqual(content, cw,
                         "ContentWrapper is not returning the right value")