def setUp(self): self.pb = ProviderBootstrapper() # At certain points we are going to be replacing these methods # directly in ProviderConfig to be able to catch calls from # new ProviderConfig objects inside the methods tested. We # need to save the old implementation and restore it in # tearDown so we are sure everything is as expected for each # test. If we do it inside each specific test, a failure in # the test will leave the implementation with the mock. self.old_gpp = util.get_path_prefix self.old_load = ProviderConfig.load self.old_save = ProviderConfig.save self.old_api_version = ProviderConfig.get_api_version self.old_api_uri = ProviderConfig.get_api_uri
def __init__(self, signaler=None, bypass_checks=False): """ Constructor for the Provider component :param signaler: Object in charge of handling communication back to the frontend :type signaler: Signaler :param bypass_checks: Set to true if the app should bypass first round of checks for CA certificates at bootstrap :type bypass_checks: bool """ self.key = "provider" self._signaler = signaler self._provider_bootstrapper = ProviderBootstrapper( signaler, bypass_checks) self._download_provider_defer = None self._provider_config = ProviderConfig()
def setUp(self): self.pb = ProviderBootstrapper()