def test_process_stats_summary_as_source(monkeypatch, aggregator, tagger):
    check = KubeletCheck('kubelet', {}, [{}])
    pod_list_utils = PodListUtils(json.loads(mock_from_file('pods_windows.json')))
    stats = json.loads(mock_from_file('stats_summary_windows.json'))

    tagger.reset()
    tagger.set_tags(WINDOWS_TAGS)

    tags = ["instance:tag"]
    check.process_stats_summary(pod_list_utils, stats, tags, True)

    aggregator.assert_metric(
        'kubernetes.ephemeral_storage.usage', 919980.0, tags + ['kube_namespace:default', 'pod_name:dd-datadog-lbvkl']
    )
    aggregator.assert_metric(
        'kubernetes.network.tx_bytes', 163670.0, tags + ['kube_namespace:default', 'pod_name:dd-datadog-lbvkl']
    )
    aggregator.assert_metric(
        'kubernetes.network.rx_bytes', 694636.0, tags + ['kube_namespace:default', 'pod_name:dd-datadog-lbvkl']
    )
    aggregator.assert_metric(
        'kubernetes.network.tx_bytes',
        258157.0,
        tags + ['kube_namespace:default', 'pod_name:windows-server-iis-6c68545d57-gwtn9'],
    )
    aggregator.assert_metric(
        'kubernetes.network.rx_bytes',
        509185.0,
        tags + ['kube_namespace:default', 'pod_name:windows-server-iis-6c68545d57-gwtn9'],
    )
    aggregator.assert_metric(
        'kubernetes.cpu.usage.total',
        13796875000.0,
        tags + ['kube_container_name:agent', 'kube_namespace:default', 'pod_name:dd-datadog-lbvkl'],
    )
    aggregator.assert_metric(
        'kubernetes.cpu.usage.total',
        9359375000.0,
        tags + ['kube_container_name:process-agent', 'kube_namespace:default', 'pod_name:dd-datadog-lbvkl'],
    )
    aggregator.assert_metric(
        'kubernetes.cpu.usage.total',
        70140625000.0,
        tags
        + [
            'kube_container_name:windows-server-iis',
            'kube_namespace:default',
            'pod_name:windows-server-iis-6c68545d57-gwtn9',
        ],
    )
    aggregator.assert_metric(
        'kubernetes.memory.working_set',
        136089600.0,
        tags + ['kube_container_name:agent', 'kube_namespace:default', 'pod_name:dd-datadog-lbvkl'],
    )
    aggregator.assert_metric(
        'kubernetes.memory.working_set',
        65474560.0,
        tags + ['kube_container_name:process-agent', 'kube_namespace:default', 'pod_name:dd-datadog-lbvkl'],
    )
    aggregator.assert_metric(
        'kubernetes.memory.working_set',
        136814592.0,
        tags
        + [
            'kube_container_name:windows-server-iis',
            'kube_namespace:default',
            'pod_name:windows-server-iis-6c68545d57-gwtn9',
        ],
    )
    aggregator.assert_metric(
        'kubernetes.filesystem.usage',
        0.0,
        tags + ['kube_container_name:agent', 'kube_namespace:default', 'pod_name:dd-datadog-lbvkl'],
    )
    aggregator.assert_metric(
        'kubernetes.filesystem.usage',
        0.0,
        tags + ['kube_container_name:process-agent', 'kube_namespace:default', 'pod_name:dd-datadog-lbvkl'],
    )
    aggregator.assert_metric(
        'kubernetes.filesystem.usage',
        0.0,
        tags
        + [
            'kube_container_name:windows-server-iis',
            'kube_namespace:default',
            'pod_name:windows-server-iis-6c68545d57-gwtn9',
        ],
    )
    aggregator.assert_metric(
        'kubernetes.filesystem.usage_pct',
        0.0,
        tags + ['kube_container_name:agent', 'kube_namespace:default', 'pod_name:dd-datadog-lbvkl'],
    )
    aggregator.assert_metric(
        'kubernetes.filesystem.usage_pct',
        0.0,
        tags + ['kube_container_name:process-agent', 'kube_namespace:default', 'pod_name:dd-datadog-lbvkl'],
    )
    aggregator.assert_metric(
        'kubernetes.filesystem.usage_pct',
        0.0,
        tags
        + [
            'kube_container_name:windows-server-iis',
            'kube_namespace:default',
            'pod_name:windows-server-iis-6c68545d57-gwtn9',
        ],
    )