Exemple #1
0
 def testDistanceIntegration(self):
     with unittest.mock.patch.dict('os.environ', environment_vars):
         wm = Managers.WebManager(sample_page)
         address1 = wm.get_details_dict()['Where']
         address2 = '37 Sunny Slope, Rancho Santa Margarita'
         mm = Managers.MapManager('googlemaps')
         self.assertEqual(6, round(mm.get_miles(address2, address1)))
Exemple #2
0
 def __init__(self, url_string, webdriver=None):
     super().__init__()
     param = Managers.ConfigManager.get_parameters() 
     self.web_manager = Managers.WebManager(url_string, webdriver=webdriver)
     self.calendar_manager = Managers.CalendarManager(param['Timezone'], start_time=param['Operating Start'], quitting_time=param['Operating End'])
     self.map_manager = Managers.MapManager('googlemaps')
Exemple #3
0
 def testDistance(self):
     address1 = '11426 Freer Street, Arcadia'
     address2 = '37 Sunny Slope, Rancho Santa Margarita'
     with unittest.mock.patch.dict('os.environ', environment_vars):
         mm = Managers.MapManager('googlemaps')
         self.assertEqual(56, round(mm.get_miles(address1, address2)))