def test__FilterDemographicResults_filters_out_december_5th_date(self):
    results = [r for r in self.mock_results
               if r['survey_type'] == 'setup.js']
    results, canonical_index = processresults._FilterDemographicResults(
        results, datetime.datetime(2014, 12, 18, 0, 0, 0, 0))

    self.assertEqual(len(results), 1)
    self.assertEqual(results[0]['date_taken'], u'2015-01-05T01:02:03.789123')
Beispiel #2
0
    def test__FilterDemographicResults_filters_out_december_5th_date(self):
        results = [
            r for r in self.mock_results if r['survey_type'] == 'setup.js'
        ]
        results, canonical_index = processresults._FilterDemographicResults(
            results, datetime.datetime(2014, 12, 18, 0, 0, 0, 0))

        self.assertEqual(len(results), 1)
        self.assertEqual(results[0]['date_taken'],
                         u'2015-01-05T01:02:03.789123')
  def test__FilterDemographicResults_reorders_techfamiliar_questions(self):
    results = [r for r in self.mock_results
               if r['survey_type'] == 'setup.js']
    results, canonical_index = processresults._FilterDemographicResults(
        results, datetime.datetime(2014, 12, 18, 0, 0, 0, 0))

    self.assertEqual(len(results), 1)
    self.assertEqual(
        results[0]['responses'][2]['question'],
        ('How familiar are you with each of the following computer and '
         'Internet-related items? I have...(DendoPort)'))
    self.assertEqual(
        results[0]['responses'][3]['question'],
        ('How familiar are you with each of the following computer and '
         'Internet-related items? I have...(TCP/IP)'))
Beispiel #4
0
    def test__FilterDemographicResults_reorders_techfamiliar_questions(self):
        results = [
            r for r in self.mock_results if r['survey_type'] == 'setup.js'
        ]
        results, canonical_index = processresults._FilterDemographicResults(
            results, datetime.datetime(2014, 12, 18, 0, 0, 0, 0))

        self.assertEqual(len(results), 1)
        self.assertEqual(
            results[0]['responses'][2]['question'],
            ('How familiar are you with each of the following computer and '
             'Internet-related items? I have...(DendoPort)'))
        self.assertEqual(
            results[0]['responses'][3]['question'],
            ('How familiar are you with each of the following computer and '
             'Internet-related items? I have...(TCP/IP)'))