rickypc / robotframework-imaplibrary

IMAP email testing library for Robot Framework
https://pypi.python.org/pypi/robotframework-imaplibrary
Apache License 2.0
21 stars 35 forks source link

decode('quoted-printable') Causes UUIDs in email body to deserialize incorrectly #16

Open Cumminsc9 opened 6 years ago

Cumminsc9 commented 6 years ago

When calling Get Email Body I expect it to return the body of the email as can be seen in the original email source. However, due to the call decode('quoted-printable') I get back a corrupted UUID and parameter. In the included case below, the parameter userIds operator = has been replaced with ! and some of the beginning characters of the UUID have been truncated causing the test to fail.

Simply removing the decode('quoted-printable') causes the userId parameter and UUID to be parsed as expected, and the test to pass successfully. Raising the question what is the reasoning behind decode('quoted-printable')?

What I get back when calling Get Email Body ${latest}

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
    <body>
        <span><a href="duesday://verify/me/email?code=12345&userId!f95bac-0c3e-4dbc-8153-70e297a81f7f">Confirm email address</a></span>
    </body>
</html>

What I expect when calling Get Email Body ${latest}

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
    <body>
        <span><a href="duesday://verify/me/email?code=12345&userId=21f95bac-0c3e-4dbc-8153-70e297a81f7f">Confirm email address</a></span>
    </body>
</html>