hookmeup

A Git hook to automate your Pipenv and Django workflow
git clone git://git.danielmoch.com/hookmeup.git
Log | Files | Refs | README | LICENSE

commit 18959d4be4dac6912cdf6cba83669413468d737b
parent c8d5b5d4b45476e7afb256336329d6093972cbc8
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Wed, 29 Aug 2018 04:59:05 -0400

Fix arg type error

Hook would never fire because an integer argument was being parsed as a
string, causing tests to always fail.

Diffstat:
Mhookmeup/__init__.py | 3++-
Mtests/test_main.py | 2+-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/hookmeup/__init__.py b/hookmeup/__init__.py @@ -7,7 +7,7 @@ from . import hookmeup __author__ = 'Daniel Moch' -__version__ = '0.1.0' +__version__ = '0.1.1' def main(): """Main hookmeup entrypoint""" @@ -44,6 +44,7 @@ def main(): post_commit_parser.add_argument('new', help='the new commit') post_commit_parser.add_argument( 'branch_checkout', + type=int, help='1 for branch checkout, 0 otherwise') post_commit_parser.set_defaults(func=hookmeup.post_checkout) args = parser.parse_args() diff --git a/tests/test_main.py b/tests/test_main.py @@ -41,7 +41,7 @@ def test_main_post_checkout(mock_hookmeup, mocker): ) hookmeup.main() hookmeup.hookmeup.post_checkout.assert_called_once_with( - {'old': '1', 'new': '2', 'branch_checkout': '3'} + {'old': '1', 'new': '2', 'branch_checkout': 3} ) assert hookmeup.hookmeup.install.call_count == 0