diff options
author | mahesh | 2017-08-18 02:13:10 +0530 |
---|---|---|
committer | mahesh | 2017-08-18 12:10:08 +0530 |
commit | 0ffc49f91dd9e21a6b9917b7841999bf853c3c9f (patch) | |
tree | 59fee2d353d6de5042a5fe1b0df5b5b34f62d8f9 /yaksh/test_views.py | |
parent | a9c4aab85fb9b8edce53212548f8d0c285832dc4 (diff) | |
download | online_test-0ffc49f91dd9e21a6b9917b7841999bf853c3c9f.tar.gz online_test-0ffc49f91dd9e21a6b9917b7841999bf853c3c9f.tar.bz2 online_test-0ffc49f91dd9e21a6b9917b7841999bf853c3c9f.zip |
Adds test cases for yaml
- Fixes selenium test cases, test_models, test_views
- Fixes create demo question paper
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r-- | yaksh/test_views.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py index e5308fc..0060ed8 100644 --- a/yaksh/test_views.py +++ b/yaksh/test_views.py @@ -3012,12 +3012,18 @@ class TestShowQuestions(TestCase): data={'file': questions_file, 'upload': 'upload'} ) + summaries = ['Roots of quadratic equation', 'Print Output', + 'Adding decimals', 'For Loop over String', + 'Hello World in File', 'Extract columns from files', + 'Check Palindrome', 'Add 3 numbers', 'Reverse a string' + ] + uploaded_ques = Question.objects.filter(active=True, - summary="Yaksh Demo Question", + summary__in=summaries, user=self.user).count() self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response, 'yaksh/showquestions.html') - self.assertEqual(uploaded_ques, 3) + self.assertEqual(uploaded_ques, 9) f.close() dummy_file = SimpleUploadedFile("test.txt", b"test") response = self.client.post(reverse('yaksh:show_questions'), |