def test_get(reader: ReaderService, read_db: SqlReadDatabaseBackendService):
    model = MagicMock()
    read_db.get = get = MagicMock(return_value=model)

    request = GetRequest("c/1", ["field"])

    assert reader.get(request) == model

    get.assert_called_with("c/1", ["field"], DeletedModelsBehaviour.NO_DELETED)
def test_get_with_position(reader: ReaderService,
                           read_db: SqlReadDatabaseBackendService):
    fqid = "c/1"
    model = MagicMock()
    reader.filter_fqids_by_deleted_status = MagicMock(return_value=[fqid])
    read_db.build_model_ignore_deleted = bmid = MagicMock(return_value=model)
    reader.apply_mapped_fields = amf = MagicMock(return_value=model)

    request = GetRequest(fqid, ["field"], 42)

    assert reader.get(request) == model

    bmid.assert_called_with(fqid, 42)
    amf.assert_called_with(model, ["field"])