Ejemplo n.º 1
0
 def setUp(self):
     super(TestHandleNewVisits, self).setUp()
     self.survey = factories.Survey(role=models.Survey.PATIENT_FEEDBACK)
Ejemplo n.º 2
0
 def setUp(self):
     super(TestStartFeedbackSurvey, self).setUp()
     self.survey = factories.Survey(role=models.Survey.PATIENT_FEEDBACK)
     self.visit = factories.Visit(mobile='01234567890')
Ejemplo n.º 3
0
 def test_active_survey(self, import_responses):
     """We should call the import_responses utility for active surveys."""
     self.survey = factories.Survey(active=True)
     tasks.import_responses()
     self.assertEqual(import_responses.call_count, 1)
     self.assertEqual(import_responses.call_args, ((self.survey.flow_id,),))
Ejemplo n.º 4
0
 def test_inactive_survey(self, import_responses):
     """We should not try to import responses for inactive surveys."""
     self.survey = factories.Survey(active=False)
     tasks.import_responses()
     self.assertEqual(import_responses.call_count, 0)
Ejemplo n.º 5
0
 def setUp(self):
     self.survey = factories.Survey(role=models.Survey.PATIENT_FEEDBACK)
     # self.question = factories.SurveyQuestion.create(
     #     survey=self.survey, label='Test1', categories="Yes\nNo")
     self.visit = factories.Visit.create()