summaryrefslogtreecommitdiff
path: root/yaksh/test_models.py
diff options
context:
space:
mode:
authorankitjavalkar2018-07-12 19:24:43 +0530
committerankitjavalkar2018-07-13 13:01:43 +0530
commit9e209521aa81631d940c3ca2010a9f373e4af09c (patch)
treeee5aa5d64c2106e04a61cda836214f034226c9b7 /yaksh/test_models.py
parente7c18d17c8b5ed193e4e34bdfe2072951d996530 (diff)
downloadonline_test-9e209521aa81631d940c3ca2010a9f373e4af09c.tar.gz
online_test-9e209521aa81631d940c3ca2010a9f373e4af09c.tar.bz2
online_test-9e209521aa81631d940c3ca2010a9f373e4af09c.zip
Add more tests
Diffstat (limited to 'yaksh/test_models.py')
-rw-r--r--yaksh/test_models.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/yaksh/test_models.py b/yaksh/test_models.py
index deb6654..14d5197 100644
--- a/yaksh/test_models.py
+++ b/yaksh/test_models.py
@@ -4,7 +4,7 @@ from yaksh.models import User, Profile, Question, Quiz, QuestionPaper,\
QuestionSet, AnswerPaper, Answer, Course, StandardTestCase,\
StdIOBasedTestCase, FileUpload, McqTestCase, AssignmentUpload,\
LearningModule, LearningUnit, Lesson, LessonFile, CourseStatus, \
- TestCaseOrder
+ TestCaseOrder, create_group
from yaksh.code_server import (
ServerPool, get_result as get_result_from_code_server
)
@@ -118,6 +118,14 @@ def tearDownModule():
###############################################################################
+class GlobalMethodsTestCases(unittest.TestCase):
+ def test_create_group_when_group_exists(self):
+ self.assertEqual(
+ create_group('moderator', 'yaksh'),
+ Group.objects.get(name='moderator')
+ )
+
+###############################################################################
class LessonTestCases(unittest.TestCase):
def setUp(self):
self.lesson = Lesson.objects.get(name='L1')