def test_widget_base_element_property_parent_setter_sets_view(): fake_parent = BaseElement(id='id') fake_parent.view = 3 b_elem = BaseElement(id='id2') b_elem.parent = fake_parent assert b_elem.view == 3, "BaseElement.parent should set the value of BaseElement.view to the parent's view"
def test_widget_base_element_property_parent_setter(): fake_parent = BaseElement(id='id') b_elem = BaseElement(id='id2') b_elem.parent = fake_parent assert b_elem._parent is fake_parent, 'BaseElement.parent should set the value of internal BaseElement._parent'