def setUp(self): self.spec = ArgumentSpec() self.patcher1 = patch('time.sleep') self.patcher1.start() try: self.p1 = patch( 'library.modules.bigip_vcmp_guest.ModuleParameters.initial_image_exists' ) self.m1 = self.p1.start() self.m1.return_value = True self.p2 = patch( 'library.modules.bigip_vcmp_guest.ModuleParameters.initial_hotfix_exists' ) self.m2 = self.p2.start() self.m2.return_value = True except Exception: self.p1 = patch( 'ansible.modules.network.f5.bigip_vcmp_guest.ModuleParameters.initial_image_exists' ) self.m1 = self.p1.start() self.m1.return_value = True self.p2 = patch( 'ansible.modules.network.f5.bigip_vcmp_guest.ModuleParameters.initial_hotfix_exists' ) self.m2 = self.p2.start() self.m2.return_value = True
def setUp(self): self.spec = ArgumentSpec() self.patcher1 = patch('time.sleep') self.patcher1.start()