def check_kickstart(self, ks_in, ks_out, expected_publish_calls=1): """Test kickstart processing. :param test_obj: TestCase object (probably self) :param ks_in: input kickstart for testing :param ks_out: expected output kickstart :param expected_publish_calls: how many times times the publisher should be called :type expected_publish_calls: int """ with patch('pyanaconda.dbus.DBus.publish_object') as publisher: check_kickstart_interface(self, self.payload_interface, ks_in, ks_out) publisher.assert_called() self.assertEqual(publisher.call_count, expected_publish_calls)
def check_kickstart(self, ks_in, ks_out=None, ks_valid=True, expected_publish_calls=1): """Test kickstart processing. :param test_obj: TestCase object (probably self) :param ks_in: input kickstart for testing :param ks_out: expected output kickstart :param expected_publish_calls: how many times times the publisher should be called :type expected_publish_calls: int """ with patch('pyanaconda.core.dbus.DBus.publish_object') as publisher: result = check_kickstart_interface(self._test, self.payload_service_interface, ks_in, "", ks_valid, ks_tmp=ks_out) if ks_valid and expected_publish_calls != 0: publisher.assert_called() self._test.assertEqual(publisher.call_count, expected_publish_calls) return result
def check_kickstart(self, ks_in, ks_out=None, ks_valid=True, ks_tmp=None, expected_publish_calls=1): """Test kickstart processing. :param ks_in: input kickstart for testing :param ks_out: expected output kickstart :param ks_valid: True if the input kickstart is valid, otherwise False :param ks_tmp: string with the temporary output kickstart :param expected_publish_calls: how many times times the publisher should be called :type expected_publish_calls: int """ with patch('pyanaconda.core.dbus.DBus.publish_object') as publisher: result = check_kickstart_interface(self._test, self.payload_service_interface, ks_in, ks_out, ks_valid, ks_tmp) if ks_valid and expected_publish_calls != 0: publisher.assert_called() self._test.assertEqual(publisher.call_count, expected_publish_calls) else: publisher.assert_not_called() return result
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.localization_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out, **kwargs): check_kickstart_interface(self, self.storage_interface, ks_in, ks_out, **kwargs)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.timezone_interface, ks_in, ks_out)
def _process_kickstart(self, ks_in): check_kickstart_interface(self, self.storage_interface, ks_in)
def _test_kickstart(self, ks_in, ks_out, ks_tmp=None): check_kickstart_interface(self, self.users_interface, ks_in, ks_out, ks_tmp=ks_tmp)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.security_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.network_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.payload_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.timezone_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.security_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.services_interface, ks_in, ks_out)
def check_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.payload_interface, ks_in, ks_out) self.publish_mock.assert_called_once()
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.network_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.firewall_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.firewall_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.services_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out, ks_tmp=None): check_kickstart_interface(self, self.users_interface, ks_in, ks_out, ks_tmp=ks_tmp)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.localization_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self, self.subscription_interface, ks_in, ks_out)