def test_dir_exists_returns_False_if_missing_with_sudo(self, *args, **kwargs): self.assertFalse( os_helpers.dir_exists(location='/tmp/level1/level2', use_sudo=False) )
def test_dir_exists_returns_True_with_sudo(self, *args, **kwargs): # make sure we have a level2 folder only accessible by root sudo('mkdir -p /tmp/level1/level2') sudo('chmod 700 /tmp/level1') self.assertTrue( os_helpers.dir_exists(location='/tmp/level1/level2', use_sudo=True))
def test_dir_exists_returns_True(self, *args, **kwargs): # make sure we have a /tmp/temp1 folder sudo('mkdir /tmp/temp1') self.assertTrue( os_helpers.dir_exists(location='/tmp/temp1', use_sudo=False) )
def test_dir_exists_returns_True_with_sudo(self, *args, **kwargs): # make sure we have a level2 folder only accessible by root sudo('mkdir -p /tmp/level1/level2') sudo('chmod 700 /tmp/level1') self.assertTrue( os_helpers.dir_exists(location='/tmp/level1/level2', use_sudo=True) )
def test_dir_exists_returns_False_if_missing_with_sudo( self, *args, **kwargs): self.assertFalse( os_helpers.dir_exists(location='/tmp/level1/level2', use_sudo=False))
def test_dir_exists_returns_False_if_missing(self, *args, **kwargs): self.assertFalse( os_helpers.dir_exists(location='/tmp/temp1', use_sudo=False))
def test_dir_exists_returns_True(self, *args, **kwargs): # make sure we have a /tmp/temp1 folder sudo('mkdir /tmp/temp1') self.assertTrue( os_helpers.dir_exists(location='/tmp/temp1', use_sudo=False))
def test_dir_exists_returns_False_if_missing(self, *args, **kwargs): self.assertFalse( os_helpers.dir_exists(location='/tmp/temp1', use_sudo=False) )