Metadata-Version: 1.1
Name: betamax
Version: 0.1.1
Summary: A VCR imitation for python-requests
Home-page: https://github.com/sigmavirus24/betamax
Author: Ian Cordasco
Author-email: graffatcolmingov@gmail.com
License: Copyright 2013 Ian Cordasco

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Description: betamax
        =======
        
        Betamax is a VCR_ imitation for requests. This will make mocking out requests 
        much easier. Tested on `Travis CI`_.
        
        Example Use
        -----------
        
        ::
        
            from betamax import Betamax
            from requests import Session
            from unittest import TestCase
        
            with Betamax.configure() as config:
                config.cassette_library_dir = 'tests/fixtures/cassettes'
        
        
            class TestGitHubAPI(TestCase):
                def setUp(self):
                    self.session = Session()
                    self.headers.update(...)
        
                # Set the cassette in a line other than the context declaration
                def test_user(self):
                    with Betamax(self.session) as vcr:
                        vcr.use_cassette('user')
                        resp = self.session.get('https://api.github.com/user',
                                                auth=('user', 'pass'))
                        assert resp.json()['login'] is not None
        
                # Set the cassette in line with the context declaration
                def test_repo(self):
                    with Betamax(self.session).use_cassette('repo') as vcr:
                        resp = self.session.get(
                            'https://api.github.com/repos/sigmavirus24/github3.py'
                            )
                        assert resp.json()['owner'] != {}
        
        VCR Cassette Compatiblity
        -------------------------
        
        Betamax can use any VCR-recorded cassette as of this point in time. The only
        caveat is that python-requests returns a URL on each response. VCR does not
        store that in a cassette now but we will. Any VCR-recorded cassette used to
        playback a response will unfortunately not have a URL attribute on responses
        that are returned. This is a minor annoyance but not something that can be
        fixed.
        
        .. _VCR: https://github.com/vcr/vcr
        .. _Travis CI: https://travis-ci.org/sigmavirus24/betamax
        
        
        History
        =======
        
        0.1.1 - 2013-09-19
        ------------------
        
        - Fix issue where there is a unicode character not in ``range(128)``
        
        0.1.0 - 2013-09-17
        ------------------
        
        - Initial Release
        
        - Support for VCR generated cassettes (JSON only)
        
        - Support for ``re_record_interval``
        
        - Support for the ``once``, ``all``, ``new_episodes``, ``all`` cassette modes
        
        - Support for filtering sensitive data
        
        - Support for the following methods of request matching:
        
          - Method
        
          - URI
        
          - Host
        
          - Path
        
          - Query String
        
          - Body
        
          - Headers
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: Implementation :: CPython
