Commit e9b9d545 by Dennis Jen

Merge pull request #352 from edx/dsjen/performance-acceptance-test

Updated answer distribution key from "count" to "last_response_count"
parents 9f1c002b f5073fd5
...@@ -296,7 +296,7 @@ class CoursePerformanceAnswerDistributionMixin(CoursePerformancePageTestsMixin): ...@@ -296,7 +296,7 @@ class CoursePerformanceAnswerDistributionMixin(CoursePerformancePageTestsMixin):
self.module = self.analytics_api_client.modules(self.page.course_id, self.page.problem_id) self.module = self.analytics_api_client.modules(self.page.course_id, self.page.problem_id)
api_response = self.module.answer_distribution() api_response = self.module.answer_distribution()
data = [i for i in api_response if i['part_id'] == self.page.part_id] data = [i for i in api_response if i['part_id'] == self.page.part_id]
self.answer_distribution = sorted(data, key=lambda a: a['count'], reverse=True) self.answer_distribution = sorted(data, key=lambda a: a['last_response_count'], reverse=True)
def get_page(self): def get_page(self):
raise NotImplementedError raise NotImplementedError
...@@ -357,7 +357,7 @@ class CoursePerformanceAnswerDistributionMixin(CoursePerformancePageTestsMixin): ...@@ -357,7 +357,7 @@ class CoursePerformanceAnswerDistributionMixin(CoursePerformancePageTestsMixin):
if answer['correct']: if answer['correct']:
correct = u'Correct' correct = u'Correct'
expected.append(correct) expected.append(correct)
expected.append(self.format_number(answer['count'])) expected.append(self.format_number(answer['last_response_count']))
self.assertListEqual(actual, expected) self.assertListEqual(actual, expected)
self.assertIn('text-right', columns[2].get_attribute('class')) self.assertIn('text-right', columns[2].get_attribute('class'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment