Ejemplo n.º 1
0
    def test_no_match(self, mock_get_tools, mock_default_name):
        """Test getting tab menu locations when no default tool exists."""
        mock_category = MagicMock(hou.NodeTypeCategory)

        mock_type = MagicMock(spec=hou.NodeType)
        mock_type.category.return_value = mock_category

        result = manager._get_tool_menu_locations(mock_type)

        self.assertEqual(result, ())

        mock_default_name.assert_called_with(mock_category.name.return_value,
                                             mock_type.name.return_value)
Ejemplo n.º 2
0
    def test_no_match(self, mock_get_tools, mock_default_name):
        """Test getting tab menu locations when no default tool exists."""
        mock_category = MagicMock(hou.NodeTypeCategory)

        mock_type = MagicMock(spec=hou.NodeType)
        mock_type.category.return_value = mock_category

        result = manager._get_tool_menu_locations(mock_type)

        self.assertEqual(result, ())

        mock_default_name.assert_called_with(
            mock_category.name.return_value,
            mock_type.name.return_value
        )
Ejemplo n.º 3
0
    def test_no_match(self, mocker):
        """Test getting tab menu locations when no default tool exists."""
        mocker.patch("hou.shelves.tools", return_value={})
        mock_default_name = mocker.patch("hou.shelves.defaultToolName")

        mock_category = mocker.MagicMock(hou.NodeTypeCategory)

        mock_type = mocker.MagicMock(spec=hou.NodeType)
        mock_type.category.return_value = mock_category

        result = manager._get_tool_menu_locations(mock_type)

        assert result == ()

        mock_default_name.assert_called_with(
            mock_category.name.return_value, mock_type.name.return_value
        )