Closed dvalters closed 4 years ago
Something like this should test the argparse:
# Arrange
mock_setup_oracle_client_function = Mock()
monkeypatch.setattr(soc, 'setup_oracle_client', mock_setup_oracle_client_function)
monkeypatch.setattr(sys, 'argv', ['setup_oracle_client', '-z', 'http://some.url', '--reinstall', '-v'])
# Act (call main from setup_oracle_client module)
main()
# Assert
mock_setup_oracle_client.assert_called_with(...)
Tests could cover with and without --zip-location
and --reinstall
.
This work was completed in #55.
Summary
See coverage html.