def test_getNodeAttribute_should_parse_node_structure_correctly(self):
        settings = ["3"]
        sys.modules["__main__"].settings.getSetting.side_effect = lambda x: settings.pop()
        player = BlipTVPlayer()
        node = Mock()
        
        player._getNodeAttribute(node, "tag", "attribute", "default")

        node.getElementsByTagName.assert_called_with("tag")
        node.getElementsByTagName().item.assert_called_with(0)
        node.getElementsByTagName().item().hasAttribute.assert_called_with("attribute")
        node.getElementsByTagName().item().getAttribute.assert_called_with("attribute")