libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tonybaloney <...@git.apache.org>
Subject [GitHub] libcloud pull request #1031: [WIP] Replace the HTTP mock methods with a tran...
Date Mon, 10 Apr 2017 23:45:50 GMT
GitHub user tonybaloney opened a pull request:

    https://github.com/apache/libcloud/pull/1031

    [WIP] Replace the HTTP mock methods with a transport adapter

    ### Description
    
    This change is to the base test classes. At the moment they mock out the response, raw
response and connection classes. Which is fine but it's led to issues that could have been
uncovered in the unit tests because it doesn't represent how the drivers actually respond.
    
    This change will replace the mock connection and mock response classes with the actual
implementations and use a `requests_mock` session context manager to get the response from
the existing methods so hopefully I won't need to change each of the test classes.
    
    For more information on contributing, please see [Contributing](http://libcloud.readthedocs.org/en/latest/development.html#contributing)
    section of our documentation.
    
    ### Status
    
    Replace this: describe the PR status. Examples:
    
    - work in progress
    - done, ready for review
    
    ### Checklist (tick everything that applies)
    
    - [ ] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide)
(required, can be done after the PR checks)
    - [ ] Documentation
    - [ ] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
    - [ ] [ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes)
(required for bigger changes)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tonybaloney/libcloud mock_refactor

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/libcloud/pull/1031.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1031
    
----
commit 2540abb3fc815d0127124e2518f9aa60fd893282
Author: Anthony Shaw <anthonyshaw@apache.org>
Date:   2017-04-10T23:41:21Z

    Replace the (ugly) HTTP mock methods with a transport adapter for requests. This will
use the actual connection classes
    and probably uncover some bugs in the tests

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message