How about:

    data['categories'] = [category['name'] for category in self.categories if category['name'] in mock_app.categories]

Note that this would need `self.get_categories` to be renamed (which it should be)