Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
leximpact-server
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leximpact
Simulateur dotations aux communes
leximpact-server
Commits
9ba1090d
Commit
9ba1090d
authored
Jun 30, 2020
by
sandcha
Browse files
Options
Downloads
Patches
Plain Diff
Initilise a test on default nbptr values in /calculate/compare response for cas types
parent
84092d39
No related branches found
No related tags found
1 merge request
!20
Nbptr in results
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/server/handlers/test_cas_types.py
+11
-0
11 additions, 0 deletions
tests/server/handlers/test_cas_types.py
with
11 additions
and
0 deletions
tests/server/handlers/test_cas_types.py
+
11
−
0
View file @
9ba1090d
...
...
@@ -236,3 +236,14 @@ def test_calculate_compare_response(client, headers, payload):
nbreParts_apres
=
dpath
.
get
(
response_json
,
'
nbreParts/apres
'
)
assert
list
(
nbreParts_apres
.
keys
())
==
[
'
0
'
,
'
1
'
,
'
2
'
,
'
3
'
,
'
4
'
,
'
5
'
]
# 6 cas types par défaut
def
test_calculate_compare_response_on_nbptr
(
client
,
headers
,
payload
):
request_data
=
json
.
dumps
(
payload
)
response
=
client
.
post
(
"
calculate/compare
"
,
data
=
request_data
,
headers
=
headers
)
assert
response
.
status_code
==
CREATED
# 201
response_json
=
json
.
loads
(
response
.
data
.
decode
(
'
utf-8
'
))
nombre_parts_cas_types_2020
=
{
"
0
"
:
1.0
,
"
1
"
:
1.5
,
"
2
"
:
2.0
,
"
3
"
:
2.0
,
"
4
"
:
3.0
,
"
5
"
:
3.0
}
assert
dpath
.
get
(
response_json
,
'
nbreParts/avant
'
)
==
nombre_parts_cas_types_2020
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