11"""Unit tests for Builder API."""
22
3- import pytest
43
54from nutrient_dws .builder import BuildAPIWrapper
65
@@ -18,7 +17,7 @@ def test_builder_add_step():
1817 """Test adding steps to builder."""
1918 builder = BuildAPIWrapper (None , "test.pdf" )
2019 result = builder .add_step ("convert-to-pdf" , options = {"format" : "docx" })
21-
20+
2221 assert result is builder # Should return self for chaining
2322 assert len (builder ._actions ) == 1
2423 assert builder ._actions [0 ]["type" ] == "convert-to-pdf"
@@ -33,7 +32,7 @@ def test_builder_chaining():
3332 .add_step ("rotate-pages" , options = {"degrees" : 90 })
3433 .add_step ("watermark-pdf" , options = {"text" : "DRAFT" })
3534 )
36-
35+
3736 assert result is builder
3837 assert len (builder ._actions ) == 3
3938 # Actions are transformed by _map_tool_to_action, so check structure exists
@@ -47,7 +46,7 @@ def test_builder_set_output_options():
4746 metadata = {"title" : "Test Doc" },
4847 optimize = True
4948 )
50-
49+
5150 assert result is builder
5251 assert builder ._output_options ["metadata" ]["title" ] == "Test Doc"
5352 assert builder ._output_options ["optimize" ] is True
@@ -57,7 +56,7 @@ def test_builder_execute_requires_client():
5756 """Test that execute requires a client."""
5857 builder = BuildAPIWrapper (None , "test.pdf" )
5958 builder .add_step ("convert-to-pdf" )
60-
59+
6160 # Without a proper client, this would fail when trying to access client methods
6261 # We can't test the actual failure without mocking, so just ensure the method exists
63- assert hasattr (builder , "execute" )
62+ assert hasattr (builder , "execute" )
0 commit comments