'Define an arbitrary code-response problem.
We\'ll end up mocking its evaluation later.'

def define_code_response_problem(self, problem_url_name):

    factory = CodeResponseXMLFactory()
    grader_payload = json.dumps({'grader': 'ps04/grade_square.py'})
    problem_xml = factory.build_xml(initial_display='def    square(x):', answer_display='answer', grader_payload=grader_payload, num_responses=2)
    ItemFactory.create(parent_location=self.problem_section.location, category='problem', display_name=str(problem_url_name), data=problem_xml)
