Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rdos-python
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
Julien David
rdos-python
Commits
f074d6d9
Commit
f074d6d9
authored
4 years ago
by
Ismail Moumni
Browse files
Options
Downloads
Patches
Plain Diff
removing init
parent
60e9e162
No related branches found
Branches containing commit
No related tags found
1 merge request
!5
Wip adding tests and json functions
Pipeline
#672
failed with stage
in 12 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
__init__.py
+0
-0
0 additions, 0 deletions
__init__.py
tests/__init__.py
+0
-0
0 additions, 0 deletions
tests/__init__.py
tests/test_match_dict.py
+2
-2
2 additions, 2 deletions
tests/test_match_dict.py
tests/test_match_json.py
+5
-5
5 additions, 5 deletions
tests/test_match_json.py
with
7 additions
and
7 deletions
__init__.py
deleted
100644 → 0
+
0
−
0
View file @
60e9e162
This diff is collapsed.
Click to expand it.
tests/__init__.py
deleted
100644 → 0
+
0
−
0
View file @
60e9e162
This diff is collapsed.
Click to expand it.
tests/test_match_dict.py
+
2
−
2
View file @
f074d6d9
#!/usr/bin/ python3
# Authors : Julien DAVID & Ismail MOUMNI
import
os
import
sys
import
client
import
os
import
pytest
sys
.
path
.
append
(
os
.
path
.
realpath
(
'
../
'
))
import
client.RdosClient
as
client
# noqa E402
test_dict1
=
{
"
name
"
:
"
Michael
"
,
"
Rafael
"
:
"
Nadal
"
}
test_dict2
=
{
"
name
"
:
"
Michael
"
,
"
Rafael
"
:
""
}
...
...
This diff is collapsed.
Click to expand it.
tests/test_match_json.py
+
5
−
5
View file @
f074d6d9
#!/usr/bin/env python3
# Authors : Julien DAVID & Ismail MOUMNI
import
os
import
sys
import
os
import
json
import
client
as
c
import
pytest
sys
.
path
.
append
(
os
.
path
.
realpath
(
'
../
'
))
import
client
# noqa E402
data
=
'
{
"
country
"
:
"
usa
"
,
"
people
"
:
""
}
'
bad_data
=
'
{
"
sasd
"
:
""
,
"
nam
"
: {
"
saasd
"
:
"
llam
"
} }
'
...
...
@@ -14,15 +14,15 @@ obj2 = json.loads(bad_data)
def
test_match_dict
():
var
=
c
.
RdosClient
.
missing_keys
(
obj
,
obj
)
var
=
c
lient
.
RdosClient
.
missing_keys
(
obj
,
obj
)
assert
var
==
[]
def
test_diff_match_dict
():
result
=
c
.
RdosClient
.
missing_keys
(
obj
,
obj2
)
result
=
c
lient
.
RdosClient
.
missing_keys
(
obj
,
obj2
)
assert
result
is
not
None
def
test_bad_match_dict
():
with
pytest
.
raises
(
Exception
):
assert
c
.
RdosClient
.
missing_keys
({},
obj
)
assert
c
lient
.
RdosClient
.
missing_keys
({},
obj
)
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