Skip to content

Commit

Permalink
test: long blur parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
BugliL committed Oct 6, 2024
1 parent 7783759 commit 60673b4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/unit/mocked/test_client_advanced_behavior.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from unittest.mock import ANY
from image_go_nord_client.main import main

from image_go_nord_client.main import main

from .unit_test_base_class import UnitTestBaseClass

Expand Down Expand Up @@ -32,6 +32,15 @@ def test_convert_to_nord_palette_using_long_no_avg_pixels_parameter(self):
ANY, save_path="output.jpg"
)

def test_convert_to_nord_palette_using_long_blur_parameter(self):
main(argv=["image-go-nord-client", "--blur", "-i=file3.png"])
self.mock_gn_instance.disable_avg_algorithm.assert_not_called()
self.mock_gn_instance.enable_gaussian_blur.assert_called_once()
self.mock_gn_instance.open_image.assert_called_with("file3.png")
self.mock_gn_instance.convert_image.assert_called_with(
ANY, save_path=self.DEFAULT_OUTPUT_FILE_NAME
)

def test_convert_to_nord_palette_using_short_blur_parameter(self):
main(argv=["image-go-nord-client", "-b", "-i=file3.png"])
self.mock_gn_instance.disable_avg_algorithm.assert_not_called()
Expand Down

0 comments on commit 60673b4

Please sign in to comment.