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.payload_service_interface, ks_in, ks_out, ks_valid, ks_tmp) if ks_valid and expected_publish_calls != 0: publisher.assert_called() assert 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.timezone_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self.localization_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self.services_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out): check_kickstart_interface(self.security_interface, ks_in, ks_out)
def _test_kickstart(self, ks_in, ks_out, ks_tmp=None): check_kickstart_interface(self.users_interface, ks_in, ks_out, ks_tmp=ks_tmp)