=== modified file 'lava_scheduler_app/tests.py'
@@ -1,20 +1,19 @@
+import cStringIO
import datetime
import json
import xmlrpclib
from django.contrib.auth.models import Permission, User
-from django.test import TestCase
+from django.test.client import Client
+
+from django_testscenarios.ubertest import TestCase
from lava_scheduler_app.models import Device, DeviceType, TestJob
-import cStringIO
-
-from xmlrpclib import ServerProxy, Transport
-
-from django.test.client import Client
+
# Based on http://www.technobabble.dk/2008/apr/02/xml-rpc-dispatching-through-django-test-client/
-class TestTransport(Transport):
+class TestTransport(xmlrpclib.Transport):
"""Handles connections to XML-RPC server through Django test client."""
def __init__(self, user=None, password=None):
@@ -138,7 +137,7 @@
class TestSchedulerAPI(TestCaseWithFactory):
def server_proxy(self, user=None, password=None):
- return ServerProxy(
+ return xmlrpclib.ServerProxy(
'http://localhost/RPC2/',
transport=TestTransport(user=user, password=password))
=== modified file 'setup.py'
@@ -38,6 +38,10 @@
"twisted",
],
setup_requires=[
- "versiontools >= 1.3.1"],
+ "versiontools >= 1.3.1",
+ ],
+ test_requires=[
+ "django-testscenarios",
+ ],
zip_safe=False,
include_package_data=True)