change it to         
data['categories'] = [category['id'] for category in self.categories 
                                       if category['name'] in [mock_category[0] for mock_category in mock_app.categories]]