def METHOD_NAME(
    self, model_factory
):
    conf_class = ConfigurationClassFactory()
    model_factory.create_batch(2, configuration_path=conf_class)
    with patch('ralph.data_center.publishers.publish_host_update') as mock:
        # refresh instance to not fall into post_commit single event
        conf_class = ConfigurationClass.objects.get(pk=conf_class.pk)
        conf_class.name = 'another_class'
        conf_class.save()
        self.assertEqual(mock.call_count, 2)