diff --git a/product_portfolio/tests/test_views.py b/product_portfolio/tests/test_views.py index 4fca611b..d57d7996 100644 --- a/product_portfolio/tests/test_views.py +++ b/product_portfolio/tests/test_views.py @@ -212,7 +212,6 @@ def test_product_portfolio_detail_view_tab_imports_view(self): def test_product_portfolio_detail_view_object_type_filter_in_inventory_tab(self): self.client.login(username="nexb_user", password="secret") - url = self.product1.get_absolute_url() pc_valid = ProductComponent.objects.create( product=self.product1, @@ -227,11 +226,12 @@ def test_product_portfolio_detail_view_object_type_filter_in_inventory_tab(self) product=self.product1, package=self.package1, dataspace=self.dataspace ) - response = self.client.get(url) + response = self.client.get(self.product1.get_absolute_url()) self.assertContains(response, 'id="tab_inventory"') - pc_filterset = response.context["tabsets"]["Inventory"]["fields"][0][1]["inventory_items"][ - "" - ] + + url = self.product1.get_url("tab_inventory") + response = self.client.get(url) + pc_filterset = response.context["inventory_items"][""] expected = """