def test_get_sequential_open_distibution(self): sequential_open_distrib = get_sequential_open_distrib(self.course.id) for problem in sequential_open_distrib: num_students = sequential_open_distrib[problem] self.assertEquals(USER_COUNT, num_students)
def test_get_sequential_open_distibution_from_client(self, mock_client): mock_client.return_value.modules.return_value.sequential_open_distribution.return_value = [{'count': USER_COUNT}] sequential_open_distrib = get_sequential_open_distrib(self.course.id, USER_COUNT) for problem in sequential_open_distrib: num_students = sequential_open_distrib[problem] self.assertEquals(USER_COUNT, num_students)