4
4
import shutil
5
5
import sh
6
6
import powerline_shell .segments .git_stash as git_stash
7
+ from powerline_shell .utils import RepoStats
7
8
8
9
9
10
class GitStashTest (unittest .TestCase ):
@@ -32,7 +33,7 @@ def _stash(self):
32
33
33
34
@mock .patch ('powerline_shell.utils.get_PATH' )
34
35
def test_git_not_installed (self , get_PATH ):
35
- get_PATH .return_value = "" # so git can't be found
36
+ get_PATH .return_value = "" # so git can't be found
36
37
self .segment .start ()
37
38
self .segment .add_to_powerline ()
38
39
self .assertEqual (self .powerline .append .call_count , 0 )
@@ -55,7 +56,7 @@ def test_one_stash(self):
55
56
self ._stash ()
56
57
self .segment .start ()
57
58
self .segment .add_to_powerline ()
58
- expected = u' {} ' .format (git_stash . STASH_SYMBOL )
59
+ expected = u' {} ' .format (RepoStats . symbols [ "stash" ] )
59
60
self .assertEqual (self .powerline .append .call_args [0 ][0 ], expected )
60
61
61
62
def test_multiple_stashes (self ):
@@ -72,5 +73,5 @@ def test_multiple_stashes(self):
72
73
73
74
self .segment .start ()
74
75
self .segment .add_to_powerline ()
75
- expected = u' 3{} ' .format (git_stash . STASH_SYMBOL )
76
+ expected = u' 3{} ' .format (RepoStats . symbols [ "stash" ] )
76
77
self .assertEqual (self .powerline .append .call_args [0 ][0 ], expected )
0 commit comments