def test_get_search_location(self): flexmock(file_io).should_receive("read").and_return("private_ip:port") self.assertEquals(appscale_info.get_search_location(), "private_ip:port") flexmock(file_io).should_receive("read").and_raise(IOError) self.assertEquals(appscale_info.get_search_location(), "")
def __init__(self): """ Constructor for solr interface. """ self._search_location = appscale_info.get_search_location()