Example #1
0
  def getListData(self):
    idx = lists.getListIndex(self.data.request)

    if idx != self.idx:
      return None

    query = profile_logic.queryAllStudentsForProgram(self.data.program.key())

    starter = lists.keyStarter

    response_builder = lists.RawQueryContentResponseBuilder(
        self.data.request, self._list_config, query, starter)

    return response_builder.buildNDB()
Example #2
0
 def testAllStudentsForProgramFetched(self):
   """Tests that the returned query fetches all students for the program."""
   query = profile_logic.queryAllStudentsForProgram(self.program_one.key())
   result = query.fetch(1000)
   self.assertEqual(self.student_keys, set(student.key for student in result))