feat: add util.get_home_path()
function
This commit is contained in:
parent
26774bbcaf
commit
d3bbc01e7a
2 changed files with 26 additions and 0 deletions
|
@ -15,6 +15,15 @@ class TestExists(TestCase):
|
|||
c.run.assert_called_once_with('test -e /foo', warn=True)
|
||||
|
||||
|
||||
class TestHomePath(TestCase):
|
||||
|
||||
def test_basic(self):
|
||||
c = MagicMock()
|
||||
c.run.return_value.stdout = '/home/foo'
|
||||
path = mod.get_home_path(c, user='foo')
|
||||
self.assertEqual(path, '/home/foo')
|
||||
|
||||
|
||||
class TestIsSymlink(TestCase):
|
||||
|
||||
def test_yes(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue