Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Julien David
rdos
Commits
d82b41ee
Commit
d82b41ee
authored
Sep 16, 2020
by
Ismail Moumni
Browse files
test_querry_valid
parent
fb4297dd
Pipeline
#685
failed with stage
in 13 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/test_query_valid.py
0 → 100644
View file @
d82b41ee
#!/usr/bin/ python3
# Authors : Julien DAVID & Ismail MOUMNI
import
sys
import
os
import
pytest
import
json
sys
.
path
.
append
(
os
.
path
.
realpath
(
'../softwares/server'
))
from
softwares.server
import
server
as
serv
# noqa E402
data_test1
=
'{"parameters":""}'
data_test2
=
'{"Ref":"Parameters"}'
data_load
=
json
.
loads
(
data_test1
)
data_load2
=
json
.
loads
(
data_test2
)
def
test_query_valid
(
data
:
dict
):
var
=
serv
.
query_valid
(
data_load
)
assert
var
def
test_bad_missing
():
with
pytest
.
raises
(
Exception
):
assert
serv
.
query_valid
(
data_load2
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment