@@ -97,14 +97,16 @@ def tearDown(self):
97
97
@p .expand (TestShortBranchStatusTestcases )
98
98
def test_format_branch_status_for_statusbar (self , status_lines , expected ):
99
99
git = GitCommand ()
100
+ when (git ).get_repo_path ().thenReturn ("somewhere" )
100
101
when (git ).in_rebase ().thenReturn (False )
101
102
when (git ).in_merge ().thenReturn (False )
102
103
when (git ).in_cherry_pick ().thenReturn (False )
103
104
when (git ).in_revert ().thenReturn (False )
104
105
105
106
when (git ).git ("status" , ...).thenReturn (status_lines )
106
107
107
- actual = git .get_branch_status_short ()
108
+ git .get_working_dir_status ()
109
+ actual = git .current_state ().get ("short_status" )
108
110
self .assertEqual (actual , expected )
109
111
110
112
# TODO: Add tests for `in_rebase` True
@@ -234,14 +236,19 @@ def tearDown(self):
234
236
@p .expand (TestLongBranchStatusTestcases )
235
237
def test_format_branch_status_for_status_dashboard (self , status_lines , expected ):
236
238
git = GitCommand ()
239
+ when (git ).get_repo_path ().thenReturn ("somewhere" )
237
240
when (git ).in_rebase ().thenReturn (False )
238
241
when (git ).in_merge ().thenReturn (False )
239
242
when (git ).in_cherry_pick ().thenReturn (False )
240
243
when (git ).in_revert ().thenReturn (False )
241
244
242
245
when (git ).git ("status" , ...).thenReturn (status_lines )
243
246
244
- actual = git .get_branch_status (delim = "\n " )
247
+ git .get_working_dir_status ()
248
+ actual = "\n " .join (
249
+ line .lstrip ()
250
+ for line in git .current_state ().get ("long_status" ).splitlines ()
251
+ )
245
252
self .assertEqual (actual , expected )
246
253
247
254
# TODO: Add tests for `in_rebase` True
0 commit comments