From 99b6dffe9604f86f08c2b53bef4f8ab35bb565a1 Mon Sep 17 00:00:00 2001 From: Harmon Date: Sun, 16 Feb 2020 17:44:22 -0600 Subject: Remove test.lib.asserts and use unittest.mock.patch directly --- git/test/test_git.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'git/test/test_git.py') diff --git a/git/test/test_git.py b/git/test/test_git.py index 75e35ab7..060a4c3c 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -21,7 +21,6 @@ from git import ( from git.compat import is_darwin from git.test.lib import ( TestBase, - patch, fixture_path ) from git.test.lib import with_rw_directory @@ -43,7 +42,7 @@ class TestGit(TestBase): import gc gc.collect() - @patch.object(Git, 'execute') + @mock.patch.object(Git, 'execute') def test_call_process_calls_execute(self, git): git.return_value = '' self.git.version() @@ -90,7 +89,7 @@ class TestGit(TestBase): self.assertEqual("70c379b63ffa0795fdbfbc128e5a2818397b7ef8", self.git.hash_object(istream=fh, stdin=True)) - @patch.object(Git, 'execute') + @mock.patch.object(Git, 'execute') def test_it_ignores_false_kwargs(self, git): # this_should_not_be_ignored=False implies it *should* be ignored self.git.version(pass_this_kwarg=False) -- cgit v1.2.1