Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
beat
beat.web
Commits
f84f19de
Commit
f84f19de
authored
6 years ago
by
Samuel GAIST
Browse files
Options
Downloads
Patches
Plain Diff
[dataformats][tests][api] Fix key search in dictionaries
parent
991a7592
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!255
1.4.x
,
!242
Py3 compatibility
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beat/web/dataformats/tests/tests_api.py
+7
-7
7 additions, 7 deletions
beat/web/dataformats/tests/tests_api.py
with
7 additions
and
7 deletions
beat/web/dataformats/tests/tests_api.py
+
7
−
7
View file @
f84f19de
...
...
@@ -58,13 +58,13 @@ class DataFormatsListRetrieval(DataFormatsAPIBase):
self
.
assertEqual
(
content
[
0
][
'
short_description
'
],
'
short description 3
'
)
self
.
assertEqual
(
content
[
0
][
'
extend
'
],
'
johndoe/format1/1
'
)
self
.
assertEqual
(
content
[
0
][
'
accessibility
'
],
'
public
'
)
self
.
assertFalse
(
content
[
0
].
has_key
(
'
is_owner
'
)
)
self
.
assertFalse
(
'
is_owner
'
in
content
[
0
]
)
self
.
assertEqual
(
content
[
1
][
'
name
'
],
'
johndoe/format1/1
'
)
self
.
assertEqual
(
content
[
1
][
'
short_description
'
],
'
short description 1
'
)
self
.
assertEqual
(
content
[
1
][
'
extend
'
],
None
)
self
.
assertEqual
(
content
[
1
][
'
accessibility
'
],
'
public
'
)
self
.
assertFalse
(
content
[
1
].
has_key
(
'
is_owner
'
)
)
self
.
assertFalse
(
'
is_owner
'
in
content
[
1
]
)
def
test_all_accessible_dataformats
(
self
):
...
...
@@ -871,9 +871,9 @@ class DataFormatRetrieval(DataFormatsAPIBase):
self
.
assertEqual
(
data
[
'
accessibility
'
],
'
public
'
)
self
.
assertEqual
(
data
[
'
description
'
],
'
long description 3
'
)
self
.
assertTrue
(
isinstance
(
data
[
'
declaration
'
],
dict
))
self
.
assertFalse
(
data
.
has_key
(
'
is_owner
'
)
)
self
.
assertFalse
(
'
is_owner
'
in
data
)
self
.
assertFalse
(
data
.
has_key
(
'
sharing
'
)
)
self
.
assertFalse
(
'
sharing
'
in
data
)
def
test_successful_retrieval_of_public_format
(
self
):
...
...
@@ -888,7 +888,7 @@ class DataFormatRetrieval(DataFormatsAPIBase):
self
.
assertEqual
(
data
[
'
description
'
],
'
long description 3
'
)
self
.
assertTrue
(
isinstance
(
data
[
'
declaration
'
],
dict
))
self
.
assertFalse
(
data
.
has_key
(
'
sharing
'
)
)
self
.
assertFalse
(
'
sharing
'
in
data
)
def
test_successful_retrieval_of_confidential_format
(
self
):
...
...
@@ -903,7 +903,7 @@ class DataFormatRetrieval(DataFormatsAPIBase):
self
.
assertEqual
(
data
[
'
short_description
'
],
'
short description 5
'
)
self
.
assertTrue
(
isinstance
(
data
[
'
declaration
'
],
dict
))
self
.
assertFalse
(
data
.
has_key
(
'
sharing
'
)
)
self
.
assertFalse
(
'
sharing
'
in
data
)
def
test_successful_retrieval_of_own_public_format
(
self
):
...
...
@@ -920,7 +920,7 @@ class DataFormatRetrieval(DataFormatsAPIBase):
self
.
assertTrue
(
isinstance
(
data
[
'
sharing
'
],
dict
))
self
.
assertEqual
(
data
[
'
sharing
'
][
'
status
'
],
'
public
'
)
self
.
assertFalse
(
data
[
'
sharing
'
].
has_key
(
'
shared_with
'
)
)
self
.
assertFalse
(
'
shared_with
'
in
data
[
'
sharing
'
]
)
def
test_successful_retrieval_of_own_private_format
(
self
):
...
...
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