Metadata-Version: 1.1
Name: hitchpython
Version: 0.1
Summary: Hitch plug-in to test python programs, including Celery and Django.
Home-page: https://hitch.readthedocs.org/
Author: Colm O'Connor
Author-email: colm.oconnor.github@gmail.com
License: AGPL
Description: HitchPython
        ===========
        
        HitchPython is a plugin for the Hitch test framework that lets you test
        python programs. Specifically, it includes code to:
        
        * Download, build and create a virtualenv from all versions of python.
        * Run a Django runserver service using hitchserve_.
        * Run a Celery service using hitchserve_.
        
        The Django runserver service will:
        
        * Optionally, run migrations and insert a site into django_sites table, prior to starting the service.
        * Install fixtures.
        * Run on a specific port.
        * Get the URL.
        * Generate a runnable manage subcommand.
        
        Install
        =======
        
        Install the module like so::
        
            $ hitch install hitchpython
        
        
        Build a virtualenv
        ==================
        
        .. code-block:: python
        
            import hitchpython
        
            def set_up(self):
                python_package = hitchpython.PythonPackage(
                    python_version="2.7.10",
                    directory=os.path.join(PROJECT_DIRECTORY, "py2710")
                )
                python_package.build()
                python_package.verify()
                # virtualenv.python now points to a usable python interpreter
        
        
        .. code-block:: python
        
            import hitchpython
        
            def set_up(self):
                self.services['Django'] = hitchdjango.DjangoService(
                    version="1.8",                                              # Mandatory
                    python=python_package.python,                               # Mandatory
                    managepy=None,                                              # Optional full path to manage.py (default: None, assumes in project directory)
                    django_fixtures=['fixture1.json',],                         # Optional (default: None)
                    port=18080,                                                 # Optional (default: 18080)
                    settings="remindme.settings",                               # Optional (default: settings)
                    needs=[self.services['Postgres'], ]                         # Optional (default: no prerequisites)
                )
        
        
                # Interact during the test:
                >>> self.services['Django'].manage("help").run()
                [ Prints help ]
        
                >>> self.services['Django'].url()
                http://127.0.0.1:18080/
        
                >>> self.services['Django'].savefixture("fixtures/database_current_state.json").run()
                [ Saves fixture ]
        
        
        See this service in action at the DjangoRemindMe_ project.
        
        
        .. _HitchServe: https://github.com/hitchtest/hitchserve
        .. _DjangoRemindMe: https://github.com/hitchtest/django-remindme
        
Keywords: hitch testing framework bdd tdd declarative tests testing service django celery python
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Classifier: Environment :: Console
Classifier: Operating System :: Unix
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.8
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.4
