def test_post_model_get_ingredients(self): post = Post('Title', 'Body', 1, difficulty=1) ingredient = Ingredient("ingredient", post.id) post.ingredients.append(ingredient) self.assertEqual(post.get_ingredients(), ['ingredient'])