Example #1
0
    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(), "")
Example #2
0
 def __init__(self):
   """ Constructor for solr interface. """
   self._search_location = appscale_info.get_search_location()
Example #3
0
 def __init__(self):
     """ Constructor for solr interface. """
     self._search_location = appscale_info.get_search_location()
  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(), "")