diff --git a/tests/test_views.py b/tests/test_views.py index bb1a8029..17681834 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -172,11 +172,13 @@ def test_scenegraph_composition(self): widget.deleteLater() def test_prim_composition(self): - temp = Usd.Stage.CreateInMemory() - ancestor = temp.DefinePrim("/a") - prim = temp.DefinePrim("/b") - prim.GetReferences().AddReference(Sdf.Reference(primPath=ancestor.GetPath())) + stage = Usd.Stage.Open(str(_test_bed)) + prim = stage.GetPrimAtPath("/Catalogue/Model/Buildings/Multi_Story_Building/Windows/Apartment/Geom/Floor") widget = description.PrimComposition() + widget._include_inert_nodes.setChecked(False) + widget._compute_expanded_index.setChecked(False) + widget._complete_target_layerstack.setChecked(True) + # DotView capabilities are tested elsewhere, so mock 'setDotPath' here. widget._dot_view.setDotPath = lambda fp: None widget.setPrim(prim) @@ -184,7 +186,7 @@ def test_prim_composition(self): # cheap. prim is affected by 2 layers # single child for this prim. self.assertTrue(widget.composition_tree._model.invisibleRootItem().hasChildren()) - + widget._compute_expanded_index.setChecked(True) widget._complete_target_layerstack.setChecked(True) widget.setPrim(prim) self.assertTrue(widget.composition_tree._model.invisibleRootItem().hasChildren())