def test_webhook_mutation_required(): pod = { "spec": { "containers": [get_cmk_container()] } } required = webhook.is_mutation_required(pod) assert required
def test_webhook_mutation_not_required(): pod = { "spec": { "containers": [{}] } } with patch('intel.webhook.is_container_mutation_required', MagicMock(return_value=False)): required = webhook.is_mutation_required(pod) assert not required