Skip to content

msabramo/djangotestxmlrpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

djangotestxmlrpc

https://secure.travis-ci.org/msabramo/djangotestxmlrpc.png?branch=master

Test 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:

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

or 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

About

Test Django XML-RPC views using the Django test client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages