Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
ntlhui committed Mar 12, 2023
1 parent 5b20f1c commit 2e3e7d9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@ def test_init_dataset():
directory=Path('.')
)

def test_init_dataset_today(test_app: Tuple[Mock, DataManager, Path]):
"""Tests init_dataset with the `today` parameter
Args:
test_app (Tuple[Mock, DataManager, Path]): Test application
"""
mock = test_app
args = split('e4edm init_dataset --date today --project TEST --location Location')
with patch('sys.argv', args):
main()
mock.assert_called_once_with(
date=dt.date.today(),
project='TEST',
location='Location',
directory=Path('.')
)

def test_init_mission(test_app: Tuple[Mock, DataManager, Path]):
"""Tests init_mission
"""
Expand Down

0 comments on commit 2e3e7d9

Please sign in to comment.