Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
python_client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
allgo
API-Clients
python_client
Commits
436fb669
There was an error fetching the commit references. Please try again later.
Commit
436fb669
authored
5 years ago
by
LETORT Sebastien
Browse files
Options
Downloads
Patches
Plain Diff
new unit test for StatusError (minor)
parent
5ce186b7
No related branches found
No related tags found
2 merge requests
!4
Client api
,
!2
Continuous integration, more tests
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_allgo.py
+17
-0
17 additions, 0 deletions
tests/test_allgo.py
with
17 additions
and
0 deletions
tests/test_allgo.py
+
17
−
0
View file @
436fb669
...
@@ -18,6 +18,23 @@ else:
...
@@ -18,6 +18,23 @@ else:
import
allgo
# I need to modify constant
import
allgo
# I need to modify constant
from
allgo
import
*
from
allgo
import
*
# ================================================
class
TestStatusError
:
REF_MSG
=
"
whatever, an error message.
"
@pytest.fixture
def
response
(
self
):
m
=
Mock
()
m
.
json
.
return_value
=
\
{
'
error
'
:
self
.
REF_MSG
}
return
m
@pytest.mark.dbg
def
test_msg
(
self
,
response
):
err
=
StatusError
(
42
,
response
)
assert
self
.
REF_MSG
==
err
.
msg
# ================================================
# ================================================
@pytest.fixture
(
scope
=
"
module
"
)
@pytest.fixture
(
scope
=
"
module
"
)
...
...
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