コード例 #1
0
def test_short_id():
    mock()
    b = DockerBackend()
    operation = b.get_images()
    images_response = operation.response
    assert images_response[0].short_id == image_data[0]["Id"][:12]
    assert images_response[1].short_id == "3ab9a7ed8a16"
コード例 #2
0
ファイル: test_docker_backend.py プロジェクト: wxlg1117/sen
def test_short_id():
    mock()
    b = DockerBackend()
    operation = b.get_images()
    images_response = operation.response
    assert images_response[0].short_id == image_data[0]["Id"][
        image_data[0]["Id"].index(":") + 1:][:12]
コード例 #3
0
ファイル: test_docker_backend.py プロジェクト: pabardina/sen
def test_images_call():
    mock()
    b = DockerBackend()
    operation = b.get_images()
    images_response = operation.response
    assert len(images_response) == 1
    assert images_response[0].image_id == image_data["Id"]
    assert images_response[0].short_name == image_data["RepoTags"][0]
コード例 #4
0
ファイル: test_docker_backend.py プロジェクト: rm3l/sen
def test_images_call():
    mock()
    b = DockerBackend()
    operation = b.get_images(cached=False)
    images_response = operation.response
    assert len(images_response) == 1
    assert images_response[0].image_id == image_data[0]["Id"]
    assert images_response[0].short_name == image_data[0]["RepoTags"][0]
    assert images_response[0].parent_id == image_data[0]["ParentId"]
    assert images_response[0].created_int == image_data[0]["Created"]
    assert [str(x) for x in images_response[0].names] == image_data[0]["RepoTags"]
コード例 #5
0
def test_short_id():
    mock()
    b = DockerBackend()
    operation = b.get_images()
    images_response = operation.response
    assert images_response[0].short_id == image_data[0]["Id"][image_data[0]["Id"].index(":")+1:][:12]