# -*- coding: utf-8 -*-
"""
Test module for prometheus
@author: <NAME>
"""
from poseidon.helpers.prometheus import Prometheus


def test_Prometheus():
    """
    Tests Prometheus
    """
    p = Prometheus.get_metrics()
    hosts = [{'active': 0, 'source': 'poseidon', 'role': 'unknown', 'state': 'unknown', 'ipv4_os': 'unknown', 'tenant': 'vlan1', 'port': 1, 'segment': 'switch1', 'ipv4': '172.16.31.10', 'mac': '00:00:00:00:00:00', 'id': 'foo1', 'behavior': 1},
             {'active': 1, 'source': 'poseidon', 'role': 'unknown', 'state': 'unknown', 'ipv4_os': 'unknown', 'tenant': 'vlan1',
                 'port': 1, 'segment': 'switch1', 'ipv4': '172.16.31.10', 'mac': '00:00:00:00:00:00', 'id': 'foo2', 'behavior': 1},
             {'active': 0, 'source': 'poseidon', 'role': 'unknown', 'state': 'unknown', 'ipv4_os': 'unknown', 'tenant': 'vlan1',
                 'port': 1, 'segment': 'switch1', 'ipv4': '172.16.31.10', 'mac': '00:00:00:00:00:00', 'id': 'foo3', 'behavior': 1},
             {'active': 1, 'source': 'poseidon1', 'role': 'unknown', 'state': 'unknown', 'ipv4_os': 'unknown', 'tenant': 'vlan1',
                 'port': 2, 'segment': 'switch1', 'ipv4': 'fc00:e968:6179::de52:7100', 'mac': '00:00:00:00:00:00', 'id': 'foo4', 'behavior': 1},
             {'active': 1, 'source': 'poseidon', 'role': 'unknown', 'state': 'unknown', 'ipv4_os': 'unknown', 'tenant': 'vlan1', 'port': 1, 'segment': 'switch1', 'ipv4': '::', 'mac': '00:00:00:00:00:00', 'id': 'foo5', 'behavior': 1}]
    p = Prometheus()
    p.update_metrics(hosts)

# -*- coding: utf-8 -*-
"""
Test module for prometheus
@author: <NAME>
"""
from poseidon.helpers.prometheus import Prometheus


def test_Prometheus():
    """
    Tests Prometheus
    """
    p = Prometheus.get_metrics()
    hosts = [{'active': 0, 'source': 'poseidon', 'role': 'unknown', 'state': 'unknown', 'ipv4_os': 'unknown', 'tenant': 'vlan1', 'port': 1, 'segment': 'switch1', 'ipv4': '172.16.31.10', 'mac': '00:00:00:00:00:00', 'id': 'foo1', 'behavior': 1},
             {'active': 1, 'source': 'poseidon', 'role': 'unknown', 'state': 'unknown', 'ipv4_os': 'unknown', 'tenant': 'vlan1',
                 'port': 1, 'segment': 'switch1', 'ipv4': '172.16.31.10', 'mac': '00:00:00:00:00:00', 'id': 'foo2', 'behavior': 1},
             {'active': 0, 'source': 'poseidon', 'role': 'unknown', 'state': 'unknown', 'ipv4_os': 'unknown', 'tenant': 'vlan1',
                 'port': 1, 'segment': 'switch1', 'ipv4': '172.16.31.10', 'mac': '00:00:00:00:00:00', 'id': 'foo3', 'behavior': 1},
             {'active': 1, 'source': 'poseidon1', 'role': 'unknown', 'state': 'unknown', 'ipv4_os': 'unknown', 'tenant': 'vlan1',
                 'port': 2, 'segment': 'switch1', 'ipv4': 'fc00:e968:6179::de52:7100', 'mac': '00:00:00:00:00:00', 'id': 'foo4', 'behavior': 1},
             {'active': 1, 'source': 'poseidon', 'role': 'unknown', 'state': 'unknown', 'ipv4_os': 'unknown', 'tenant': 'vlan1', 'port': 1, 'segment': 'switch1', 'ipv4': '::', 'mac': '00:00:00:00:00:00', 'id': 'foo5', 'behavior': 1}]
    p = Prometheus()
    p.update_metrics(hosts)

# -*- coding: utf-8 -*- Test module for prometheus @author: <NAME> Tests Prometheus