コード例 #1
0
def test_webhook_mutation_required():
    pod = {
        "spec": {
            "containers": [get_cmk_container()]
        }
    }
    required = webhook.is_mutation_required(pod)
    assert required
コード例 #2
0
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