@@ -33,17 +33,17 @@ def test_git_pull_fail(mock_subproc_popen):
33
33
])
34
34
assert {'code' : 1 , 'message' : 'Authentication failed' } == actual_response
35
35
36
- @patch ('jupyterlab_git.git.git_auth_input_wrapper ' )
36
+ @patch ('jupyterlab_git.git.GitAuthInputWrapper ' )
37
37
@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 ):
39
39
# Given
40
40
process_mock = Mock ()
41
41
attrs = {
42
42
'communicate.return_value' : "remote: Invalid username or password.\r \n fatal: Authentication failed for 'repo_url'" .encode ('utf-8' ),
43
43
'returncode' : 1
44
44
}
45
45
process_mock .configure_mock (** attrs )
46
- mock_git_auth_input_wrapper .return_value = process_mock
46
+ mock_GitAuthInputWrapper .return_value = process_mock
47
47
48
48
# When
49
49
auth = {
@@ -54,7 +54,7 @@ def test_git_pull_with_auth_fail(mock_git_auth_input_wrapper):
54
54
55
55
56
56
# Then
57
- mock_git_auth_input_wrapper .assert_has_calls ([
57
+ mock_GitAuthInputWrapper .assert_has_calls ([
58
58
call (
59
59
command = 'git pull --no-commit' ,
60
60
cwd = '/bin/test_curr_path' ,
@@ -94,17 +94,17 @@ def test_git_pull_success(mock_subproc_popen):
94
94
])
95
95
assert {'code' : 0 } == actual_response
96
96
97
- @patch ('jupyterlab_git.git.git_auth_input_wrapper ' )
97
+ @patch ('jupyterlab_git.git.GitAuthInputWrapper ' )
98
98
@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 ):
100
100
# Given
101
101
process_mock = Mock ()
102
102
attrs = {
103
103
'communicate.return_value' : ('output' , '' .encode ('utf-8' )),
104
104
'returncode' : 0
105
105
}
106
106
process_mock .configure_mock (** attrs )
107
- mock_git_auth_input_wrapper .return_value = process_mock
107
+ mock_GitAuthInputWrapper .return_value = process_mock
108
108
109
109
# When
110
110
auth = {
@@ -114,7 +114,7 @@ def test_git_pull_with_auth_success(mock_git_auth_input_wrapper):
114
114
actual_response = Git (root_dir = '/bin' ).pull ('test_curr_path' , auth )
115
115
116
116
# Then
117
- mock_git_auth_input_wrapper .assert_has_calls ([
117
+ mock_GitAuthInputWrapper .assert_has_calls ([
118
118
call (
119
119
command = 'git pull --no-commit' ,
120
120
cwd = '/bin/test_curr_path' ,
@@ -154,17 +154,17 @@ def test_git_push_fail(mock_subproc_popen):
154
154
])
155
155
assert {'code' : 1 , 'message' : 'Authentication failed' } == actual_response
156
156
157
- @patch ('jupyterlab_git.git.git_auth_input_wrapper ' )
157
+ @patch ('jupyterlab_git.git.GitAuthInputWrapper ' )
158
158
@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 ):
160
160
# Given
161
161
process_mock = Mock ()
162
162
attrs = {
163
163
'communicate.return_value' : "remote: Invalid username or password.\r \n fatal: Authentication failed for 'repo_url'" .encode ('utf-8' ),
164
164
'returncode' : 1
165
165
}
166
166
process_mock .configure_mock (** attrs )
167
- mock_git_auth_input_wrapper .return_value = process_mock
167
+ mock_GitAuthInputWrapper .return_value = process_mock
168
168
169
169
# When
170
170
auth = {
@@ -174,7 +174,7 @@ def test_git_push_with_auth_fail(mock_git_auth_input_wrapper):
174
174
actual_response = Git (root_dir = '/bin' ).push ('test_origin' , 'HEAD:test_master' , 'test_curr_path' , auth )
175
175
176
176
# Then
177
- mock_git_auth_input_wrapper .assert_has_calls ([
177
+ mock_GitAuthInputWrapper .assert_has_calls ([
178
178
call (
179
179
command = 'git push test_origin HEAD:test_master' ,
180
180
cwd = '/bin/test_curr_path' ,
@@ -215,17 +215,17 @@ def test_git_push_success(mock_subproc_popen):
215
215
])
216
216
assert {'code' : 0 } == actual_response
217
217
218
- @patch ('jupyterlab_git.git.git_auth_input_wrapper ' )
218
+ @patch ('jupyterlab_git.git.GitAuthInputWrapper ' )
219
219
@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 ):
221
221
# Given
222
222
process_mock = Mock ()
223
223
attrs = {
224
224
'communicate.return_value' : 'does not matter' .encode ('utf-8' ),
225
225
'returncode' : 0
226
226
}
227
227
process_mock .configure_mock (** attrs )
228
- mock_git_auth_input_wrapper .return_value = process_mock
228
+ mock_GitAuthInputWrapper .return_value = process_mock
229
229
230
230
# When
231
231
auth = {
@@ -235,7 +235,7 @@ def test_git_push_with_auth_success(mock_git_auth_input_wrapper):
235
235
actual_response = Git (root_dir = '/bin' ).push ('.' , 'HEAD:test_master' , 'test_curr_path' , auth )
236
236
237
237
# Then
238
- mock_git_auth_input_wrapper .assert_has_calls ([
238
+ mock_GitAuthInputWrapper .assert_has_calls ([
239
239
call (
240
240
command = 'git push . HEAD:test_master' ,
241
241
cwd = '/bin/test_curr_path' ,
0 commit comments