diff --git a/tests/test_bl_types/test_material.py b/tests/test_bl_types/test_material.py index 910d4bc..953bae2 100644 --- a/tests/test_bl_types/test_material.py +++ b/tests/test_bl_types/test_material.py @@ -7,13 +7,12 @@ import bpy from multi_user.bl_types.bl_material import BlMaterial -def test_material(clear_blend): +def test_material_nodes(clear_blend): nodes_types = [node.bl_rna.identifier for node in bpy.types.ShaderNode.__subclasses__()] - + datablock = bpy.data.materials.new("test") datablock.use_nodes = True - bpy.data.materials.create_gpencil_data(datablock) - + for ntype in nodes_types: datablock.node_tree.nodes.new(ntype) @@ -26,3 +25,18 @@ def test_material(clear_blend): result = implementation._dump(test) assert not DeepDiff(expected, result) + + +def test_material_gpencil(clear_blend): + datablock = bpy.data.materials.new("test") + bpy.data.materials.create_gpencil_data(datablock) + + implementation = BlMaterial() + expected = implementation._dump(datablock) + bpy.data.materials.remove(datablock) + + test = implementation._construct(expected) + implementation._load(expected, test) + result = implementation._dump(test) + + assert not DeepDiff(expected, result)