forked from lovelysystems/robotframework-imaplibrary
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adjust documentation - Add Python 3.x support both source and supporting files - Adjust test cases - Add virtualenv support
- Loading branch information
Showing
10 changed files
with
142 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,49 +23,35 @@ I will try to accomodate as much as I could as time permit. **There is no need t | |
|
||
If you are interested to contribute back to this project, please see **Contributing** section. | ||
|
||
Example | ||
''''''' | ||
|
||
+----------------+----------------------+---------------------------+-----------------+ | ||
| Open Mailbox | host=imap.domain.com | [email protected] | password=secret | | ||
+----------------+----------------------+---------------------------+-----------------+ | ||
| ${LATEST} = | Wait For Email | [email protected] | timeout=300 | | ||
+----------------+----------------------+---------------------------+-----------------+ | ||
| ${HTML} = | Open Link From Email | ${LATEST} | | ||
+----------------+----------------------+---------------------------------------------+ | ||
| Should Contain | ${HTML} | Your email address has been updated | | ||
+----------------+----------------------+---------------------------------------------+ | ||
| Close Mailbox | | ||
+-------------------------------------------------------------------------------------+ | ||
|
||
Multipart Email Example | ||
''''''''''''''''''''''' | ||
|
||
+----------------+----------------------+---------------------------+-----------------+ | ||
| Open Mailbox | host=imap.domain.com | [email protected] | password=secret | | ||
+----------------+----------------------+---------------------------+-----------------+ | ||
| ${LATEST} = | Wait For Email | [email protected] | timeout=300 | | ||
+----------------+----------------------+---------------------------+-----------------+ | ||
| ${parts} = | Walk Multipart Email | ${LATEST} | | ||
+----------------+----------------------+---------------------------+-----------------+ | ||
| :FOR | ${i} | IN RANGE | ${parts} | | ||
+----------------+----------------------+---------------------------+-----------------+ | ||
| \\ | Walk Multipart Email | ${LATEST} | | ||
+----------------+----------------------+---------------------------------------------+ | ||
| \\ | ${content-type} = | Get Multipart Content Type | | ||
+----------------+----------------------+---------------------------------------------+ | ||
| \\ | Continue For Loop If | '${content-type}' != 'text/html' | | ||
+----------------+----------------------+---------------------------+-----------------+ | ||
| \\ | ${payload} = | Get Multipart Payload | decode=True | | ||
+----------------+----------------------+---------------------------+-----------------+ | ||
| \\ | Should Contain | ${payload} | your email | | ||
+----------------+----------------------+---------------------------+-----------------+ | ||
| \\ | ${HTML} = | Open Link From Email | ${LATEST} | | ||
+----------------+----------------------+---------------------------+-----------------+ | ||
| \\ | Should Contain | ${HTML} | Your email | | ||
+----------------+----------------------+---------------------------+-----------------+ | ||
| Close Mailbox | | ||
+-------------------------------------------------------------------------------------+ | ||
Examples | ||
'''''''' | ||
|
||
.. code:: robotframework | ||
*** Settings *** | ||
Library ImapLibrary | ||
*** Test Cases *** | ||
Email Verification | ||
Open Mailbox host=imap.domain.com [email protected] password=secret | ||
${LATEST} = Wait For Email [email protected] timeout=300 | ||
${HTML} = Open Link From Email ${LATEST} | ||
Should Contain ${HTML} Your email address has been updated | ||
Close Mailbox | ||
Multipart Email Verification | ||
Open Mailbox host=imap.domain.com [email protected] password=secret | ||
${LATEST} = Wait For Email [email protected] timeout=300 | ||
${parts} = Walk Multipart Email ${LATEST} | ||
:FOR ${i} IN RANGE ${parts} | ||
\\ Walk Multipart Email ${LATEST} | ||
\\ ${content-type} = Get Multipart Content Type | ||
\\ Continue For Loop If '${content-type}' != 'text/html' | ||
\\ ${payload} = Get Multipart Payload decode=True | ||
\\ Should Contain ${payload} your email | ||
\\ ${HTML} = Open Link From Email ${LATEST} | ||
\\ Should Contain ${HTML} Your email | ||
Close Mailbox | ||
Installation | ||
------------ | ||
|
@@ -75,15 +61,15 @@ Using ``pip`` | |
|
||
The recommended installation method is using pip_: | ||
|
||
.. code:: bash | ||
.. code:: console | ||
pip install robotframework-imaplibrary | ||
The main benefit of using ``pip`` is that it automatically installs all | ||
dependencies needed by the library. Other nice features are easy upgrading | ||
and support for un-installation: | ||
|
||
.. code:: bash | ||
.. code:: console | ||
pip install --upgrade robotframework-imaplibrary | ||
pip uninstall robotframework-imaplibrary | ||
|
@@ -92,7 +78,7 @@ Notice that using ``--upgrade`` above updates both the library and all | |
its dependencies to the latest version. If you want, you can also install | ||
a specific version: | ||
|
||
.. code:: bash | ||
.. code:: console | ||
pip install robotframework-imaplibrary==x.x.x | ||
|
@@ -128,23 +114,23 @@ and its dependencies yourself. | |
|
||
- Find each public key used to sign the package: | ||
|
||
.. code:: bash | ||
.. code:: console | ||
gpg --keyserver pgp.mit.edu --search-keys D1406DE7 | ||
- Select the number from the list to import the public key | ||
|
||
- Verify the package against its PGP signature: | ||
|
||
.. code:: bash | ||
.. code:: console | ||
gpg --verify robotframework-imaplibrary-x.x.x.tar.gz.asc robotframework-imaplibrary-x.x.x.tar.gz | ||
- Extract each source distribution to a temporary location. | ||
|
||
- Go to each created directory from the command line and install each project using: | ||
|
||
.. code:: bash | ||
.. code:: console | ||
python setup.py install | ||
|
@@ -174,11 +160,10 @@ Usage | |
To write tests with Robot Framework and ImapLibrary, | ||
ImapLibrary must be imported into your Robot test suite. | ||
|
||
+-----------------------+ | ||
| *** Settings *** | | ||
+---------+-------------+ | ||
| Library | ImapLibrary | | ||
+---------+-------------+ | ||
.. code:: robotframework | ||
*** Settings *** | ||
Library ImapLibrary | ||
See `Robot Framework User Guide`_ for more information. | ||
|
||
|
@@ -190,7 +175,7 @@ Building Keyword Documentation | |
|
||
The `Keyword Documentation`_ can be found online, if you need to generate the keyword documentation, run: | ||
|
||
.. code:: bash | ||
.. code:: console | ||
make doc | ||
|
@@ -199,7 +184,7 @@ Run Unit Tests, and Test Coverage Report | |
|
||
Test the testing library, talking about dogfooding, let's run: | ||
|
||
.. code:: bash | ||
.. code:: console | ||
make test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,8 @@ disable=locally-disabled | |
[sdist] | ||
formats=gztar,zip | ||
|
||
[TYPECHECK] | ||
ignored-modules=urllib2 | ||
|
||
[wheel] | ||
universal=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.