Skip to content

Commit

Permalink
Moved tests to module that does not get installed
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfischer committed Nov 14, 2011
1 parent d0bf39d commit b007513
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 197 deletions.
11 changes: 0 additions & 11 deletions rpc4django/tests/__init__.py

This file was deleted.

116 changes: 0 additions & 116 deletions rpc4django/tests/test_rpcviews.py

This file was deleted.

10 changes: 0 additions & 10 deletions rpc4django/tests/testmod/__init__.py

This file was deleted.

5 changes: 0 additions & 5 deletions rpc4django/tests/testmod/testsubmod/__init__.py

This file was deleted.

74 changes: 37 additions & 37 deletions setup.py
Expand Up @@ -83,42 +83,42 @@ def finalize_options(self):
""" + open('docs/setup.txt').read()

setup(
name = 'rpc4django',
version = '0.1.10',
description = 'Handles JSONRPC and XMLRPC requests easily with Django',
long_description = long_description,
author = 'David Fischer',
author_email = 'rpc4django@davidfischer.name',
url = 'http://www.davidfischer.name/rpc4django',
license = 'BSD',
platforms = ['OS Independent'],
packages = ['rpc4django',
'rpc4django.tests',
'rpc4django.tests.testmod',
'rpc4django.tests.testmod.testsubmod',
'rpc4django.templatetags',
],
data_files = [('rpc4django/templates/rpc4django',
['rpc4django/templates/rpc4django/rpcmethod_summary.html'])],
cmdclass = cmdclasses,
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules',

],
name = 'rpc4django',
version = '0.1.10',
description = 'Handles JSONRPC and XMLRPC requests easily with Django',
long_description = long_description,
author = 'David Fischer',
author_email = 'rpc4django@davidfischer.name',
url = 'http://www.davidfischer.name/rpc4django',
license = 'BSD',
platforms = ['OS Independent'],
packages = ['rpc4django',
'rpc4django.templatetags',
],
data_files = [('rpc4django/templates/rpc4django',
['rpc4django/templates/rpc4django/rpcmethod_summary.html'])],
cmdclass = cmdclasses,
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules',

],

install_requires=['Django >=1.0'],

# templates packaged into eggs cannot be loaded unless TEMPLATE_LOADER
# django.template.loaders.eggs.load_template_source
# is specifically enabled.
# By setting zip_safe=False, setuptools will unpack the egg
zip_safe = False,
install_requires=['Django >=1.0'],

# templates packaged into eggs cannot be loaded unless TEMPLATE_LOADER
# django.template.loaders.eggs.load_template_source
# is specifically enabled.
# By setting zip_safe=False, setuptools will unpack the egg
zip_safe = False,

tests_require=['Django >=1.0', 'docutils >=0.4'],
test_suite='tests',
)
Empty file added tests/__init__.py
Empty file.
File renamed without changes.
Expand Up @@ -139,24 +139,6 @@ def test_register_method(self):
self.assertEqual(jsondict['id'], 1)
self.assertEqual(jsondict['result'], 3)

def test_register_methods(self):
self.d.register_rpcmethods(['rpc4django.tests.testmod'])

jsontxt = '{"params":[3,1],"method":"subtract","id":1}'
resp = self.d.jsondispatch(jsontxt)
jsondict = json.loads(resp)
self.assertTrue(jsondict['error'] is None)
self.assertEqual(jsondict['id'], 1)
self.assertEqual(jsondict['result'], 2)

jsontxt = '{"params":[3,2],"method":"power","id":99}'
resp = self.d.jsondispatch(jsontxt)
jsondict = json.loads(resp)
self.assertTrue(jsondict['error'] is None)
self.assertEqual(jsondict['id'], 99)
self.assertEqual(jsondict['result'], 9)


def test_kwargs(self):
self.d.register_method(self.kwargstest)

Expand Down
File renamed without changes.

0 comments on commit b007513

Please sign in to comment.