'Create a test course with the requested problem `data` and `metadata` values.
Appropriate defaults are provided when either argument is omitted.'

def build_course_with_problems(self, data='<problem></problem>', metadata=None):

    metadata = (metadata or self.problem_metadata)
    return self.build_course([{u'org': u'GradesTestOrg', u'course': u'GB101', u'run': u'cannonball', u'metadata': {u'format': u'homework'}, u'#type': u'course', u'#ref': u'course', u'#children': [{u'metadata': metadata, u'#type': u'problem', u'#ref': u'problem', u'data': data}]}])
