Merge pull request #76 from gmbrax/test/command-tests

Add the tests to the command file
This commit is contained in:
Gustavo Henrique Miranda 2025-07-21 19:40:40 -03:00 committed by GitHub
commit 050939b4b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 0 deletions

9
tests/test_command.py Normal file
View File

@ -0,0 +1,9 @@
from unittest.mock import patch
from pilgrim.command import main
@patch('pilgrim.command.Application')
def test_main_function_runs_application(MockApplication):
mock_app_instance = MockApplication.return_value
main()
MockApplication.assert_called_once()
mock_app_instance.run.assert_called_once()