-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed import statement and added a test file for the cli
- Loading branch information
1 parent
ff6c637
commit 7657856
Showing
2 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"""Tests for the CLI options.""" | ||
|
||
import sys | ||
from unittest import mock | ||
|
||
import pytest | ||
|
||
from imap_data_access import cli | ||
|
||
|
||
def test_cli_works(): | ||
"""Smoke test for the CLI module making sure it is callable.""" | ||
with mock.patch.object(sys, "argv", ["imap-data-access", "-h"]): | ||
# Should have a 0 SystemExit return code if successful | ||
with pytest.raises(SystemExit, match="0"): | ||
cli.main() |