Skip to content

Commit c3d3754

Browse files
committed
fixed Git constructor calls in test_branch.py
1 parent 2979bee commit c3d3754

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

jupyterlab_git/tests/test_branch.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def test_checkout_branch_noref_success(mock__get_branch_reference, mock_subproc_
9090
mock_subproc_popen.return_value = process_mock
9191

9292
# When
93-
actual_response = Git(root_dir='/bin').checkout_branch(branchname=branch, current_path=curr_path)
93+
actual_response = Git(FakeContentManager('/bin')).checkout_branch(branchname=branch, current_path=curr_path)
9494

9595
# Then
9696
mock__get_branch_reference.assert_has_calls([ call(branch, curr_path) ])
@@ -120,7 +120,7 @@ def test_checkout_branch_noref_failure(mock__get_branch_reference, mock_subproc_
120120
mock_subproc_popen.return_value = process_mock
121121

122122
# When
123-
actual_response = Git(root_dir='/bin').checkout_branch(branchname=branch, current_path=curr_path)
123+
actual_response = Git(FakeContentManager('/bin')).checkout_branch(branchname=branch, current_path=curr_path)
124124

125125
# Then
126126
mock__get_branch_reference.assert_has_calls([ call(branch, curr_path) ])
@@ -153,7 +153,7 @@ def test_checkout_branch_remoteref_success(mock__get_branch_reference, mock_subp
153153
mock_subproc_popen.return_value = process_mock
154154

155155
# When
156-
actual_response = Git(root_dir='/bin').checkout_branch(branchname=branch, current_path=curr_path)
156+
actual_response = Git(FakeContentManager('/bin')).checkout_branch(branchname=branch, current_path=curr_path)
157157

158158
# Then
159159
mock__get_branch_reference.assert_has_calls([ call(branch, curr_path) ])
@@ -182,7 +182,7 @@ def test_checkout_branch_headsref_failure(mock__get_branch_reference, mock_subpr
182182
mock_subproc_popen.return_value = process_mock
183183

184184
# When
185-
actual_response = Git(root_dir='/bin').checkout_branch(branchname=branch, current_path=curr_path)
185+
actual_response = Git(FakeContentManager('/bin')).checkout_branch(branchname=branch, current_path=curr_path)
186186

187187
# Then
188188
mock__get_branch_reference.assert_has_calls([ call(branch, curr_path) ])
@@ -213,7 +213,7 @@ def test_checkout_branch_headsref_success(mock__get_branch_reference, mock_subpr
213213
mock_subproc_popen.return_value = process_mock
214214

215215
# When
216-
actual_response = Git(root_dir='/bin').checkout_branch(
216+
actual_response = Git(FakeContentManager('/bin')).checkout_branch(
217217
branchname=branch,
218218
current_path='test_curr_path')
219219

@@ -241,7 +241,7 @@ def test_checkout_branch_remoteref_failure(mock__get_branch_reference, mock_subp
241241
mock_subproc_popen.return_value = process_mock
242242

243243
# When
244-
actual_response = Git(root_dir='/bin').checkout_branch(branchname=branch, current_path='test_curr_path')
244+
actual_response = Git(FakeContentManager('/bin')).checkout_branch(branchname=branch, current_path='test_curr_path')
245245

246246
# Then
247247
cmd=['git', 'checkout', '--track', branch]
@@ -268,7 +268,7 @@ def test_get_branch_reference_success(mock_subproc_popen):
268268
mock_subproc_popen.return_value = process_mock
269269

270270
# When
271-
actual_response = Git(root_dir='/bin')._get_branch_reference(
271+
actual_response = Git(FakeContentManager('/bin'))._get_branch_reference(
272272
branchname=branch,
273273
current_path='test_curr_path')
274274

@@ -303,7 +303,7 @@ def test_get_branch_reference_failure(mock_subproc_popen):
303303
mock_subproc_popen.return_value = process_mock
304304

305305
# When
306-
actual_response = Git(root_dir='/bin')._get_branch_reference(
306+
actual_response = Git(FakeContentManager('/bin'))._get_branch_reference(
307307
branchname=branch,
308308
current_path='test_curr_path')
309309

0 commit comments

Comments
 (0)