diff --git a/budget_plan_detail/tests/common.py b/budget_plan_detail/tests/common.py index 900ed677..ac48dd56 100644 --- a/budget_plan_detail/tests/common.py +++ b/budget_plan_detail/tests/common.py @@ -60,7 +60,10 @@ def create_budget_plan( } ) if self.check_plan_detail_installed and not skip_line_detail: - self._create_budget_plan_line_detail(self, budget_plan) + # create_budget_plan is called unbound (self=class) from setUpClass, + # or bound (self=instance) from a test method; normalize to unbound. + cls = self if isinstance(self, type) else type(self) + cls._create_budget_plan_line_detail(self, budget_plan) return budget_plan def _create_simple_bill(