Skip to content

Commit

Permalink
Fix call checking for Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
christopher-dG committed Dec 18, 2019
1 parent ccd3ce5 commit 8bd01eb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/test_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ def test_versions(debug):
delta = timedelta(days=3)
assert r._versions(min_age=delta) == {"1.2.3": "abc", "2.3.4": "bcd"}
gh_repo.get_commits.assert_called_once()
calls = gh_repo.get_commits.mock_calls
assert len(calls) == 1
c = calls[0]
assert not c.args and len(c.kwargs) == 1 and "until" in c.kwargs
assert isinstance(c.kwargs["until"], datetime)
assert len(gh_repo.get_commits.mock_calls) == 1
args, kwargs = gh_repo.get_commits.mock_calls[0][1:]
assert not args
assert len(kwargs) == 1 and "until" in kwargs
assert isinstance(kwargs["until"], datetime)
gh_repo.get_contents.assert_called_with("path/Versions.toml", ref="abcdef")
debug.assert_not_called()
gh_repo.get_commits.return_value = []
Expand Down

0 comments on commit 8bd01eb

Please sign in to comment.