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