Skip to content

Commit

Permalink
fix(test): only set return value on expected function
Browse files Browse the repository at this point in the history
  • Loading branch information
devstein committed Nov 13, 2024
1 parent 70a9a00 commit 3c5afa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sparkmagic/sparkmagic/tests/test_sparkkernelbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TestSparkKernel(SparkKernelBase):
def __init__(self, user_code_parser=None):
kwargs = {"testing": True}
if user_code_parser is None:
user_code_parser = MagicMock(return_value=code)
user_code_parser = MagicMock()
user_code_parser.get_code_to_run = MagicMock(return_value=code)

super().__init__(
Expand All @@ -27,7 +27,7 @@ def __init__(self, user_code_parser=None):
def setup_function():
global kernel, execute_cell_mock, do_shutdown_mock, ipython_display

user_code_parser = MagicMock(return_value=code)
user_code_parser = MagicMock()
user_code_parser.get_code_to_run = MagicMock(return_value=code)
kernel = TestSparkKernel(user_code_parser)

Expand Down

0 comments on commit 3c5afa1

Please sign in to comment.