def test_dfs_absent(self): ''' Test for Check if a file or directory is absent on the distributed FS. ''' with patch.object(hadoop, '_hadoop_cmd', side_effect=['No such file or directory', 'A']): self.assertTrue(hadoop.dfs_absent('path')) self.assertFalse(hadoop.dfs_absent('path'))
def test_dfs_absent(self): ''' Test for Check if a file or directory is absent on the distributed FS. ''' with patch.object(hadoop, '_hadoop_cmd', side_effect=['No such file or directory', 'A']): self.assertTrue(hadoop.dfs_absent('path')) self.assertFalse(hadoop.dfs_absent('path'))
def test_dfs_absent(self): """ Test for Check if a file or directory is absent on the distributed FS. """ with patch.object(hadoop, "_hadoop_cmd", side_effect=["No such file or directory", "A"]): self.assertTrue(hadoop.dfs_absent("path")) self.assertFalse(hadoop.dfs_absent("path"))