Beispiel #1
0
def test_blueprint_model_all(mock_send):
    """Test get_all function of BlueprintModel."""
    mock_send.return_value = BLUEPRINT_MODEL_LIST
    assert len(list(BlueprintModel.get_all())) == 1

    blueprint_model_1 = next(BlueprintModel.get_all())
    assert blueprint_model_1.blueprint_model_id == "11111111-2222-3333-4444-555555555555"
    assert blueprint_model_1.artifact_uuid is None
    assert blueprint_model_1.artifact_type == "SDNC_MODEL"
    assert blueprint_model_1.artifact_version == "1.0.0"
    assert blueprint_model_1.internal_version is None
    assert blueprint_model_1.created_date == "2020-12-14T19:33:57.000Z"
    assert blueprint_model_1.artifact_name == "test_blueprint"
    assert blueprint_model_1.published == "Y"
    assert blueprint_model_1.updated_by == "Carlos Santana <*****@*****.**>"
    assert blueprint_model_1.tags == "Carlos Santana, test, blueprint"
Beispiel #2
0
def test_blueprint_model_all_empty(mock_send):
    """Test get_all function of BlueprintModel with no BlueprintModels."""
    mock_send.return_value = ""
    assert len(list(BlueprintModel.get_all())) == 0