'Test the function for exporting all resources from the Recommender.'

def test_export_resources(self):

    self.call_event('remove_resource', {'id': self.resource_id, 'reason': ''})
    self.call_event('endorse_resource', {'id': self.resource_id_second, 'reason': ''})
    resp = json.loads(self.call_event('export_resources', {}).content)
    self.assertIn(self.resource_id_second, resp['export']['recommendations'])
    self.assertNotIn(self.resource_id, resp['export']['recommendations'])
    self.assertIn(self.resource_id_second, resp['export']['endorsed_recommendation_ids'])
    self.assertIn(self.resource_id, resp['export']['removed_recommendations'])
    self.assert_request_status_code(200, self.course_url)
