Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
tuduun committed Mar 28, 2024
1 parent 88f2fa9 commit 2f5aa24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ def test_plot_irfs():
mock_irf.plot.return_value = mock_fig

independent_var = 'GDP'
description = "This is a test description."

# Patch the streamlit.pyplot function
with patch('app.display.st.pyplot') as mock_pyplot:
# Call the function with the mock IRF object and an independent variable
display.plot_irfs(mock_irf, independent_var)
display.plot_irfs(mock_irf, independent_var, description)

# Assert the IRF plot method was called correctly
mock_irf.plot.assert_called_once_with(impulse=independent_var, response='LAYOFFS', orth=True,
Expand Down

0 comments on commit 2f5aa24

Please sign in to comment.