Example #1
0
    def testInitNoArgs(self):
        """
        It can be initialized without arguments and will have the
        docstring as the string representation.
        """
        sut = ldifprotocol.LDIFParseError()

        result = str(sut)

        self.assertEqual('Error parsing LDIF.', result)
Example #2
0
    def testInitWithArgs(self):
        """
        When initialized with arguments it will use the docstring as
        base and include all the arguments.
        """
        sut = ldifprotocol.LDIFParseError(1, "test", True, FixStringRepresentation())

        result = str(sut)

        self.assertEqual("Error parsing LDIF: 1: test: True: Here I am!.", result)