You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by tonybaloney <gi...@git.apache.org> on 2017/04/10 23:45:50 UTC

[GitHub] libcloud pull request #1031: [WIP] Replace the HTTP mock methods with a tran...

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 <an...@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.
---

[GitHub] libcloud pull request #1031: Replace the HTTP mock methods with a transport ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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.
---