Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Base Worker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Workers
Base Worker
Commits
57da5f1a
Commit
57da5f1a
authored
2 years ago
by
NolanB
Browse files
Options
Downloads
Patches
Plain Diff
Modif code with the review
parent
3b00a9f1
No related branches found
No related tags found
No related merge requests found
Pipeline
#79542
failed
2 years ago
Stage: test
Stage: build
Stage: release
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_elements_worker/test_entities.py
+20
-5
20 additions, 5 deletions
tests/test_elements_worker/test_entities.py
with
20 additions
and
5 deletions
tests/test_elements_worker/test_entities.py
+
20
−
5
View file @
57da5f1a
...
...
@@ -659,6 +659,9 @@ def test_list_transcription_entities(fake_dummy_worker):
<<<<<<<
HEAD
<<<<<<<
HEAD
<<<<<<<
HEAD
<<<<<<<
HEAD
=======
>>>>>>>
a8b7730
...
Modif
code
with
the
review
=======
>>>>>>>
a8b7730
...
Modif
code
with
the
review
@pytest.mark.parametrize
(
...
...
@@ -672,6 +675,7 @@ def test_list_transcription_entities(fake_dummy_worker):
],
)
def
test_list_corpus_entities
(
fake_dummy_worker
,
name
,
parent
):
<<<<<<<
HEAD
<<<<<<<
HEAD
corpus
=
Corpus
({
"
id
"
:
"
fake_corpus_id
"
})
query_params
=
{}
...
...
@@ -722,20 +726,31 @@ def test_list_corpus_entities(fake_dummy_worker):
>>>>>>>
a8b7730
...
Modif
code
with
the
review
=======
def
test_list_corpus_entities
(
fake_dummy_worker
):
=======
>>>>>>>
a8b7730
...
Modif
code
with
the
review
corpus
=
Corpus
({
"
id
"
:
"
fake_corpus_id
"
})
name
=
"
fake_name
"
parent
=
"
fake_parent
"
query_params
=
{}
if
name
is
not
None
:
query_params
[
"
name
"
]
=
name
if
parent
is
not
None
:
query_params
[
"
parent
"
]
=
parent
if
type
(
parent
)
==
Element
:
query_params
[
"
parent
"
]
=
parent
.
id
fake_dummy_worker
.
api_client
.
add_response
(
"
ListCorpusEntities
"
,
id
=
corpus
.
id
,
name
=
name
,
parent
=
parent
,
response
=
{
"
id
"
:
"
fake_entity_id
"
},
**
query_params
,
)
assert
fake_dummy_worker
.
list_corpus_entities
(
corpus
,
name
,
parent
)
==
{
assert
fake_dummy_worker
.
list_corpus_entities
(
corpus
,
**
query_params
)
==
{
"
id
"
:
"
fake_entity_id
"
}
<<<<<<<
HEAD
>>>>>>>
fb7d0b7
...
Add
a
list_corpus_entities
()
method
to
entity
.
py
=======
>>>>>>>
a8b7730
...
Modif
code
with
the
review
assert
len
(
fake_dummy_worker
.
api_client
.
history
)
==
1
assert
len
(
fake_dummy_worker
.
api_client
.
responses
)
==
0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment