Ejemplo n.º 1
0
def test_platform_manager_find_by_id_not_found():
    available_platform = Platform('ubuntu', 'trusty')
    available_platforms = [available_platform]
    platform_manager = PlatformManager(available_platforms)

    assert platform_manager.find_by_id('ubuntu:precise') is None
Ejemplo n.º 2
0
def test_platform_manager_find_by_id_without_colon():
    available_platform = Platform('ubuntu', 'trusty')
    available_platforms = [available_platform]
    platform_manager = PlatformManager(available_platforms)

    assert platform_manager.find_by_id('ubuntutrusty') is None
Ejemplo n.º 3
0
def test_platform_manager_find_by_id_found():
    available_platform = Platform('ubuntu', 'trusty')
    available_platforms = [available_platform]
    platform_manager = PlatformManager(available_platforms)

    assert id(platform_manager.find_by_id('ubuntu:trusty')) == id(available_platform)