def test_generate_configuration():
    expected = {
        "foo.main": {"host": "169.254.255.254", "port": 1024},
        "bar.canary": {"host": "169.254.255.254", "port": 1025},
    }

    with mock.patch("paasta_tools.generate_services_yaml.get_all_namespaces", return_value=MOCK_NAMESPACES):
        actual = generate_services_yaml.generate_configuration()

    assert expected == actual
def test_generate_configuration(mock_namespaces):
    expected = {
        'foo.main': {
            'host': '169.254.255.254',
            'port': 1024
        },
        'bar.canary': {
            'host': '169.254.255.254',
            'port': 1025
        }
    }
    assert expected == generate_services_yaml.generate_configuration()
def test_generate_configuration(mock_namespaces):
    expected = {
        'foo.main': {
            'host': '169.254.255.254',
            'port': 1024
        },
        'bar.canary': {
            'host': '169.254.255.254',
            'port': 1025
        }
    }
    assert expected == generate_services_yaml.generate_configuration()
def test_generate_configuration():
    expected = {
        'foo.main': {
            'host': '169.254.255.254',
            'port': 1024
        },
        'bar.canary': {
            'host': '169.254.255.254',
            'port': 1025
        }
    }

    with mock.patch('paasta_tools.generate_services_yaml.get_all_namespaces',
                    return_value=MOCK_NAMESPACES):
        actual = generate_services_yaml.generate_configuration()

    assert expected == actual