Skip to content

Commit

Permalink
updating test for new code
Browse files Browse the repository at this point in the history
  • Loading branch information
theburningbush committed Nov 15, 2024
1 parent 534c92a commit 8333586
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ def test_check_for_deleted():
def test_user_input():
# Running this one last since I'm altering sys.argv. Doesn't seem to impact anything else but just in case - could also make context manager
# Passing in all currently available cli flags
sys.argv[1:] = ['-c', 'path/to/test_config.json', '-f', '-i', '-u', 'http://192.168.1.100:8089', '-p', '5']
assert backup.user_input() == (Path('path/to/test_config.json'), True, True, 'http://192.168.1.100:8089', 5)
sys.argv[1:] = ['-c', 'path/to/test_config.json', '-f', '-i', '-u', 'http://192.168.1.100:8089', '-p', '5', '-v']
assert backup.user_input() == (Path('path/to/test_config.json'), True, True, 'http://192.168.1.100:8089', 5, True)
sys.argv = [''] # Pretending we're calling command with no additional cli flags
assert backup.user_input() == (Path().cwd().joinpath('config.json'), False, False, None, None)
assert backup.user_input() == (Path().cwd().joinpath('config.json'), False, False, None, None, False)


def test_load_config():
Expand Down

0 comments on commit 8333586

Please sign in to comment.