@@ -33,17 +33,17 @@ def test_git_pull_fail(mock_subproc_popen):
3333 ])
3434 assert {'code' : 1 , 'message' : 'Authentication failed' } == actual_response
3535
36- @patch ('jupyterlab_git.git.git_auth_input_wrapper ' )
36+ @patch ('jupyterlab_git.git.GitAuthInputWrapper ' )
3737@patch ('os.environ' , {'TEST' : 'test' })
38- def test_git_pull_with_auth_fail (mock_git_auth_input_wrapper ):
38+ def test_git_pull_with_auth_fail (mock_GitAuthInputWrapper ):
3939 # Given
4040 process_mock = Mock ()
4141 attrs = {
4242 'communicate.return_value' : "remote: Invalid username or password.\r \n fatal: Authentication failed for 'repo_url'" .encode ('utf-8' ),
4343 'returncode' : 1
4444 }
4545 process_mock .configure_mock (** attrs )
46- mock_git_auth_input_wrapper .return_value = process_mock
46+ mock_GitAuthInputWrapper .return_value = process_mock
4747
4848 # When
4949 auth = {
@@ -54,7 +54,7 @@ def test_git_pull_with_auth_fail(mock_git_auth_input_wrapper):
5454
5555
5656 # Then
57- mock_git_auth_input_wrapper .assert_has_calls ([
57+ mock_GitAuthInputWrapper .assert_has_calls ([
5858 call (
5959 command = 'git pull --no-commit' ,
6060 cwd = '/bin/test_curr_path' ,
@@ -94,17 +94,17 @@ def test_git_pull_success(mock_subproc_popen):
9494 ])
9595 assert {'code' : 0 } == actual_response
9696
97- @patch ('jupyterlab_git.git.git_auth_input_wrapper ' )
97+ @patch ('jupyterlab_git.git.GitAuthInputWrapper ' )
9898@patch ('os.environ' , {'TEST' : 'test' })
99- def test_git_pull_with_auth_success (mock_git_auth_input_wrapper ):
99+ def test_git_pull_with_auth_success (mock_GitAuthInputWrapper ):
100100 # Given
101101 process_mock = Mock ()
102102 attrs = {
103103 'communicate.return_value' : ('output' , '' .encode ('utf-8' )),
104104 'returncode' : 0
105105 }
106106 process_mock .configure_mock (** attrs )
107- mock_git_auth_input_wrapper .return_value = process_mock
107+ mock_GitAuthInputWrapper .return_value = process_mock
108108
109109 # When
110110 auth = {
@@ -114,7 +114,7 @@ def test_git_pull_with_auth_success(mock_git_auth_input_wrapper):
114114 actual_response = Git (root_dir = '/bin' ).pull ('test_curr_path' , auth )
115115
116116 # Then
117- mock_git_auth_input_wrapper .assert_has_calls ([
117+ mock_GitAuthInputWrapper .assert_has_calls ([
118118 call (
119119 command = 'git pull --no-commit' ,
120120 cwd = '/bin/test_curr_path' ,
@@ -154,17 +154,17 @@ def test_git_push_fail(mock_subproc_popen):
154154 ])
155155 assert {'code' : 1 , 'message' : 'Authentication failed' } == actual_response
156156
157- @patch ('jupyterlab_git.git.git_auth_input_wrapper ' )
157+ @patch ('jupyterlab_git.git.GitAuthInputWrapper ' )
158158@patch ('os.environ' , {'TEST' : 'test' })
159- def test_git_push_with_auth_fail (mock_git_auth_input_wrapper ):
159+ def test_git_push_with_auth_fail (mock_GitAuthInputWrapper ):
160160 # Given
161161 process_mock = Mock ()
162162 attrs = {
163163 'communicate.return_value' : "remote: Invalid username or password.\r \n fatal: Authentication failed for 'repo_url'" .encode ('utf-8' ),
164164 'returncode' : 1
165165 }
166166 process_mock .configure_mock (** attrs )
167- mock_git_auth_input_wrapper .return_value = process_mock
167+ mock_GitAuthInputWrapper .return_value = process_mock
168168
169169 # When
170170 auth = {
@@ -174,7 +174,7 @@ def test_git_push_with_auth_fail(mock_git_auth_input_wrapper):
174174 actual_response = Git (root_dir = '/bin' ).push ('test_origin' , 'HEAD:test_master' , 'test_curr_path' , auth )
175175
176176 # Then
177- mock_git_auth_input_wrapper .assert_has_calls ([
177+ mock_GitAuthInputWrapper .assert_has_calls ([
178178 call (
179179 command = 'git push test_origin HEAD:test_master' ,
180180 cwd = '/bin/test_curr_path' ,
@@ -215,17 +215,17 @@ def test_git_push_success(mock_subproc_popen):
215215 ])
216216 assert {'code' : 0 } == actual_response
217217
218- @patch ('jupyterlab_git.git.git_auth_input_wrapper ' )
218+ @patch ('jupyterlab_git.git.GitAuthInputWrapper ' )
219219@patch ('os.environ' , {'TEST' : 'test' })
220- def test_git_push_with_auth_success (mock_git_auth_input_wrapper ):
220+ def test_git_push_with_auth_success (mock_GitAuthInputWrapper ):
221221 # Given
222222 process_mock = Mock ()
223223 attrs = {
224224 'communicate.return_value' : 'does not matter' .encode ('utf-8' ),
225225 'returncode' : 0
226226 }
227227 process_mock .configure_mock (** attrs )
228- mock_git_auth_input_wrapper .return_value = process_mock
228+ mock_GitAuthInputWrapper .return_value = process_mock
229229
230230 # When
231231 auth = {
@@ -235,7 +235,7 @@ def test_git_push_with_auth_success(mock_git_auth_input_wrapper):
235235 actual_response = Git (root_dir = '/bin' ).push ('.' , 'HEAD:test_master' , 'test_curr_path' , auth )
236236
237237 # Then
238- mock_git_auth_input_wrapper .assert_has_calls ([
238+ mock_GitAuthInputWrapper .assert_has_calls ([
239239 call (
240240 command = 'git push . HEAD:test_master' ,
241241 cwd = '/bin/test_curr_path' ,
0 commit comments