From 9e209521aa81631d940c3ca2010a9f373e4af09c Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Thu, 12 Jul 2018 19:24:43 +0530 Subject: Add more tests --- yaksh/test_models.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'yaksh/test_models.py') 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 ) @@ -117,6 +117,14 @@ def tearDownModule(): Group.objects.all().delete() +############################################################################### +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): -- cgit