Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/msabramo/djangotestxmlrpc
Test Django XML-RPC views using the Django test client
https://github.com/msabramo/djangotestxmlrpc
Last synced: 28 days ago
JSON representation
Test Django XML-RPC views using the Django test client
- Host: GitHub
- URL: https://github.com/msabramo/djangotestxmlrpc
- Owner: msabramo
- Created: 2012-09-30T16:27:47.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-07-06T21:59:16.000Z (over 11 years ago)
- Last Synced: 2024-08-10T09:32:20.243Z (5 months ago)
- Language: Python
- Size: 145 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
djangotestxmlrpc
=======================================.. image:: https://secure.travis-ci.org/msabramo/djangotestxmlrpc.png?branch=master
:target: http://travis-ci.org/msabramo/djangotestxmlrpcTest Django `XML-RPC `_ views using the `Django test
client
`_.
Because you're using the Django test client, you're not actually sending HTTP
requests and don't need a server running.This is a slightly modified version of code taken from `this blog post
`_
from Forest Bond.Example usage:
.. code-block:: python
from djangotestxmlrpc import DjangoTestClientXMLRPCTransport
class TestXmlRpc(django.test.TestCase):
...def test_list_package(self):
pypi = xmlrpclib.ServerProxy(
"http://localhost/pypi/",
transport=DjangoTestClientXMLRPCTransport(self.client))
pypi_hits = pypi.list_packages()
expected = ['foo']
self.assertEqual(pypi_hits, expected)Supported Python versions
-------------------------- Python 2.5
- Python 2.6
- Python 2.7
- PyPy 1.9
- Python 3.1
- Python 3.2
- Python 3.3or says `tox `_::
~/dev/git-repos/djangotestxmlrpc$ tox
...
py25: commands succeeded
py26: commands succeeded
py27: commands succeeded
pypy: commands succeeded
py31: commands succeeded
py32: commands succeeded
py33: commands succeeded
congratulations :)You also can check the `latest Travis CI results
`_, but
Travis doesn't build all of the above platforms.PyPI
----https://pypi.python.org/pypi/djangotestxmlrpc
Issues
------Send your bug reports and feature requests to https://github.com/msabramo/djangotestxmlrpc/issues