Пример #1
0
 def test_create(self):
     r = FakeReq()
     r.POST = {'video_id': 'abcdefg', 'title': 'Sample'}
     block = YouTubeBlock.create(r)
     self.assertEquals(block.video_id, 'abcdefg')
     self.assertEquals(block.title, 'Sample')
     self.assertEquals(block.display_name, 'YouTube Video')
Пример #2
0
 def test_create(self):
     r = FakeReq()
     r.POST = {'description': 'description', 'rhetorical': 'rhetorical',
               'allow_redo': True, 'show_submit_state': False}
     casequiz = CaseQuiz.create(r)
     self.assertEquals(casequiz.description, 'description')
     self.assertEquals(casequiz.display_name, 'Decision Block')
Пример #3
0
 def test_create(self):
     r = FakeReq()
     r.POST = {'video_id': 'abcdefg', 'language': 'en', 'title': 'Sample'}
     block = YouTubeBlock.create(r)
     self.assertEquals(block.video_id, 'abcdefg')
     self.assertEquals(block.language, 'en')
     self.assertEquals(block.title, 'Sample')
     self.assertEquals(block.display_name, 'YouTube Video')
Пример #4
0
 def test_create(self):
     r = FakeReq()
     month = MonthFactory()
     r.POST = {'description': 'description',
               'correct_date': 10,
               'month': month.id}
     block = CalendarChart.create(r)
     self.assertEqual(block.correct_date, 10)
     self.assertEqual(block.description, 'description')
     self.assertEqual(block.month, month)
Пример #5
0
 def test_create(self):
     r = FakeReq()
     r.POST = {'explanation': 'explanation', 'question': 'question',
               'ml_nvp': 1.6, 'times_day': 3, 'weeks': 3}
     block = DosageActivity.create(r)
     self.assertEqual(block.explanation, 'explanation')
     self.assertEqual(block.question, "question")
     self.assertEqual(block.ml_nvp, Decimal('1.6'))
     self.assertEqual(block.times_day, 3)
     self.assertEqual(block.weeks, 3)
Пример #6
0
 def test_adcard_create(self):
     r = FakeReq()
     r.POST = {'quiz_class': 'quiz class info here'}
     adcard = AdherenceCard.create(r)
     self.assertEqual(adcard.quiz_class, 'quiz class info here')
     self.assertEqual(adcard.display_name, "Adherence Card")
Пример #7
0
 def test_create(self):
     r = FakeReq()
     r.POST = {'description': 'create'}
     artcard = ConversationScenario.create(r)
     self.assertEqual(artcard.description, 'create')
Пример #8
0
 def test_artcard_create(self):
     r = FakeReq()
     r.POST = {'intro_text': 'intro_text info here'}
     artcard = ARTCard.create(r)
     self.assertEqual(artcard.intro_text, 'intro_text info here')
     self.assertEqual(artcard.display_name, "ART Card")
Пример #9
0
 def test_img_int_create(self):
     r = FakeReq()
     r.POST = {'intro_text': 'intro_text info here'}
     img_int = ImageInteractive.create(r)
     self.assertEqual(img_int.intro_text, 'intro_text info here')
     self.assertEqual(img_int.display_name, "Image Interactive")
Пример #10
0
 def test_create(self):
     r = FakeReq()
     r.POST = {'intro_text': 'intro_text info here'}
     block = RetentionRateCard.create(r)
     self.assertEqual(block.intro_text, 'intro_text info here')
     self.assertEqual(block.display_name, "Retention Rate Card")
Пример #11
0
 def test_create(self):
     r = FakeReq()
     r.POST = {'quiz_class': 'quiz class info here'}
     block = QuizSummaryBlock.create(r)
     self.assertEquals(block.quiz_class, 'quiz class info here')
     self.assertEquals(block.display_name, 'Quiz Summary Block')
Пример #12
0
 def test_adcard_create(self):
     r = FakeReq()
     r.POST = {'quiz_class': 'intro_text info here'}
     adcard = AdherenceCard.create(r)
     self.assertEquals(adcard.quiz_class, 'intro_text info here')
     self.assertEquals(adcard.display_name, "Adherence Card")
Пример #13
0
 def test_artcard_create(self):
     r = FakeReq()
     r.POST = {'intro_text': 'intro_text info here'}
     artcard = ARTCard.create(r)
     self.assertEquals(artcard.intro_text, 'intro_text info here')
     self.assertEquals(artcard.display_name, "ART Card")
Пример #14
0
 def test_img_int_create(self):
     r = FakeReq()
     r.POST = {'intro_text': 'intro_text info here'}
     img_int = ImageInteractive.create(r)
     self.assertEquals(img_int.intro_text, 'intro_text info here')
     self.assertEquals(img_int.display_name, "Image Interactive")
Пример #15
0
 def test_create(self):
     r = FakeReq()
     r.POST = {'quiz_class': 'quiz class info here'}
     block = QuizSummaryBlock.create(r)
     self.assertEquals(block.quiz_class, 'quiz class info here')
     self.assertEquals(block.display_name, 'Quiz Summary Block')