コード例 #1
0
    def test_no_dirs(self, mocker, fix_hou_exceptions):
        mock_find = mocker.patch("ht.sohohooks.aovs.manager.hou.findDirectories")
        mock_find.side_effect = hou.OperationFailed

        result = manager._find_houdinipath_aov_folders()

        assert result == ()
コード例 #2
0
    def test_dirs(self, mocker):
        """Test when one or more config/aov folders exist in HOUDINI_PATH."""
        mock_find = mocker.patch(
            "ht.sohohooks.aovs.manager.hou.findDirectories")

        result = manager._find_houdinipath_aov_folders()

        assert result == mock_find.return_value
コード例 #3
0
    def test_no_dirs(self, mock_find):
        def raise_error(*args, **kwargs):
            raise hou.OperationFailed()

        mock_find.side_effect = raise_error

        result = manager._find_houdinipath_aov_folders()

        self.assertEqual(result, ())
コード例 #4
0
    def test_no_dirs(self, mocker, fix_hou_exceptions):
        """Test when no config/aov folders exist in HOUDINI_PATH."""
        mock_find = mocker.patch(
            "ht.sohohooks.aovs.manager.hou.findDirectories")
        mock_find.side_effect = hou.OperationFailed

        result = manager._find_houdinipath_aov_folders()

        assert result == ()
コード例 #5
0
    def test_dirs(self, mock_find):
        result = manager._find_houdinipath_aov_folders()

        self.assertEqual(result, mock_find.return_value)
コード例 #6
0
    def test_dirs(self, mocker):
        mock_find = mocker.patch("ht.sohohooks.aovs.manager.hou.findDirectories")

        result = manager._find_houdinipath_aov_folders()

        assert result == mock_find.return_value