diff options
author | Prabhu Ramachandran | 2018-01-02 18:07:39 +0530 |
---|---|---|
committer | GitHub | 2018-01-02 18:07:39 +0530 |
commit | e566d54239efcb46f253e324b7295a676378f656 (patch) | |
tree | 3a93f3305c8b72dc2052ca33837b9b3dadb5d7af /yaksh/live_server_tests/load_test.py | |
parent | 29a06f7372690796a05262fac6c428580e1f3155 (diff) | |
parent | 9bfdc506c3a54835ba9a1cd1fb70e9c2f825f0fb (diff) | |
download | online_test-e566d54239efcb46f253e324b7295a676378f656.tar.gz online_test-e566d54239efcb46f253e324b7295a676378f656.tar.bz2 online_test-e566d54239efcb46f253e324b7295a676378f656.zip |
Merge pull request #401 from FOSSEE/yaksh_video_lessons
Yaksh Learning Module
Diffstat (limited to 'yaksh/live_server_tests/load_test.py')
-rw-r--r-- | yaksh/live_server_tests/load_test.py | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/yaksh/live_server_tests/load_test.py b/yaksh/live_server_tests/load_test.py index 5ab1cc2..520bebe 100644 --- a/yaksh/live_server_tests/load_test.py +++ b/yaksh/live_server_tests/load_test.py @@ -1,17 +1,10 @@ -import os -import signal -import subprocess -from datetime import datetime -import pytz from threading import Thread -from selenium.webdriver.firefox.webdriver import WebDriver - from django.contrib.staticfiles.testing import StaticLiveServerTestCase -from yaksh.models import User, Profile, Question, Quiz, Course, QuestionPaper, TestCase +# Local imports +from yaksh.models import User, Profile, Course from yaksh.code_server import ServerPool from yaksh import settings - from .selenium_test import SeleniumTest @@ -33,20 +26,24 @@ class YakshSeleniumTests(StaticLiveServerTestCase): cls.code_server_thread = t = Thread(target=code_server_pool.run) t.start() - cls.demo_student = User.objects.create_user(username='demo_student', - password='demo_student', - email='demo_student@test.com' + cls.demo_student = User.objects.create_user( + username='demo_student', + password='demo_student', + email='demo_student@test.com' ) - cls.demo_student_profile = Profile.objects.create(user=cls.demo_student, + cls.demo_student_profile = Profile.objects.create( + user=cls.demo_student, roll_number=3, institute='IIT', department='Chemical', position='Student' ) - cls.demo_mod = User.objects.create_user(username='demo_mod', - password='demo_mod', - email='demo_mod@test.com' + cls.demo_mod = User.objects.create_user( + username='demo_mod', + password='demo_mod', + email='demo_mod@test.com' ) - cls.demo_mod_profile = Profile.objects.create(user=cls.demo_mod, + cls.demo_mod_profile = Profile.objects.create( + user=cls.demo_mod, roll_number=0, institute='IIT', department='Chemical', position='Moderator' ) @@ -73,5 +70,11 @@ class YakshSeleniumTests(StaticLiveServerTestCase): def test_load(self): url = '%s%s' % (self.live_server_url, '/exam/login/') quiz_name = "Yaksh Demo quiz" - selenium_test = SeleniumTest(url=url, quiz_name=quiz_name) - selenium_test.run_load_test(url=url, username='demo_student', password='demo_student') + module_name = "Demo Module" + course_name = "Yaksh Demo course" + selenium_test = SeleniumTest(url=url, quiz_name=quiz_name, + module_name=module_name, + course_name=course_name) + selenium_test.run_load_test( + url=url, username='demo_student', password='demo_student' + ) |