def test_get_ipaddress_bad_ohai_output(self):
        class MockSudoReturnValue(str):
            succeeded = True

        with patch.object(chef, 'sudo') as mock_method:
            mocked_ohai_response = ('Invalid gemspec '
                                    '["{0}"]'.format("1.1.1.2"))
            mock_method.return_value = MockSudoReturnValue(mocked_ohai_response)
            self.assertRaises(SystemExit, chef._get_ipaddress, {})
Makes sure the root field is a valid absolute path and is writeable.
dataset/ETHPy150Open tobami/littlechef/tests/test_lib.py/TestChef.test_get_ipaddress_bad_ohai_output--crossover with--dataset/ETHPy150Open girder/girder/girder/utility/filesystem_assetstore_adapter.py/FilesystemAssetstoreAdapter.validateInfo