summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authorankitjavalkar2016-09-12 16:22:55 +0530
committerankitjavalkar2016-09-21 17:51:23 +0530
commit953f856edc18ed22c72c56b58171e2ce5bc450e5 (patch)
tree07c235e66cfa3f335093f3ad4e7a35228abd95d8 /yaksh
parent722e82275c28418dc7535ca7393b81eecadbeba9 (diff)
downloadonline_test-953f856edc18ed22c72c56b58171e2ce5bc450e5.tar.gz
online_test-953f856edc18ed22c72c56b58171e2ce5bc450e5.tar.bz2
online_test-953f856edc18ed22c72c56b58171e2ce5bc450e5.zip
Run the selenium and unit tests separately
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/tests/load_test.py (renamed from yaksh/tests/test_load.py)21
-rw-r--r--yaksh/tests/selenium_test.py1
2 files changed, 12 insertions, 10 deletions
diff --git a/yaksh/tests/test_load.py b/yaksh/tests/load_test.py
index 27ae750..fd90b11 100644
--- a/yaksh/tests/test_load.py
+++ b/yaksh/tests/load_test.py
@@ -11,10 +11,10 @@ from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from yaksh.models import User, Profile, Question, Quiz, Course, QuestionPaper, TestCase
from selenium_test import SeleniumTest
-from yaksh.code_server import ServerPool, SERVER_POOL_PORT, SERVER_PORTS
+from yaksh.code_server import ServerPool #SERVER_POOL_PORT, SERVER_PORTS
from yaksh import settings
-from yaksh.xmlrpc_clients import CodeServerProxy
-from django.core.management import call_command
+# from django.core.management import call_command
+from yaksh.management.commands.create_demo_course import create_demo_course
CUR_DIR = os.path.dirname(os.path.abspath(__file__))
@@ -31,19 +31,22 @@ class MySeleniumTests(StaticLiveServerTestCase):
"yaksh.cpp_code_evaluator.CppCodeEvaluator"
settings.code_evaluators['bash']['standardtestcase'] = \
"yaksh.bash_code_evaluator.BashCodeEvaluator"
- code_server_pool = ServerPool(ports=SERVER_PORTS, pool_port=SERVER_POOL_PORT)
+ settings.SERVER_POOL_PORT = 53578
+ code_server_pool = ServerPool(ports=settings.SERVER_PORTS, pool_port=settings.SERVER_POOL_PORT)
cls.code_server_pool = code_server_pool
cls.code_server_thread = t = Thread(target=code_server_pool.run)
t.start()
- call_command('create_demo_course')
+ demo_course_setup = create_demo_course()
@classmethod
def tearDownClass(cls):
- User.objects.all().delete()
- Question.objects.all().delete()
- Quiz.objects.all().delete()
- Course.objects.all().delete()
+ # User.objects.all().delete()
+ # Question.objects.all().delete()
+ # Quiz.objects.all().delete()
+ # Course.objects.all().delete()
+
+ settings.SERVER_POOL_PORT = 53579
cls.code_server_pool.stop()
cls.code_server_thread.join()
diff --git a/yaksh/tests/selenium_test.py b/yaksh/tests/selenium_test.py
index 15d730e..01ccc96 100644
--- a/yaksh/tests/selenium_test.py
+++ b/yaksh/tests/selenium_test.py
@@ -126,7 +126,6 @@ def user_gen(url, ids):
def wrap_run_load_test(args):
url = "http://yaksh.fossee.aero.iitb.ac.in/exam/"
- quiz_name = "yaksh_demo_quiz"
selenium_test = SeleniumTest(url=url, quiz_name=quiz_name)
return selenium_test.run_load_test(*args)