Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rdos
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
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
Commits
701a3615
Commit
701a3615
authored
4 years ago
by
Ismail Moumni
Browse files
Options
Downloads
Patches
Plain Diff
editing tests
parent
9e0f66c2
No related branches found
Branches containing commit
No related tags found
1 merge request
!5
Adding json functions
Pipeline
#687
failed
4 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+16
-0
16 additions, 0 deletions
.gitignore
tests/test_mail.py
+6
-6
6 additions, 6 deletions
tests/test_mail.py
tests/test_query_valid.py
+2
-2
2 additions, 2 deletions
tests/test_query_valid.py
with
24 additions
and
8 deletions
.gitignore
+
16
−
0
View file @
701a3615
...
...
@@ -4,3 +4,19 @@ softwares/server/.vscode/settings.json
softwares/database/__init__.py
softwares/database/.vscode/settings.json
tests/test_server.py
softwares/.vscode/settings.json
tests/.vscode/settings.json
.vscode/settings.json
softwares/__init__.py
softwares/__pycache__/__init__.cpython-38.pyc
softwares/server/__pycache__/__init__.cpython-38.pyc
softwares/server/__pycache__/server.cpython-38.pyc
tests/__init__.py
tests/.vscode/settings.json
tests/.vscode/settings.json
tests/__pycache__/test_secret.cpython-38-pytest-6.0.2.pyc
tests/.vscode/settings.json
tests/.vscode/settings.json
tests/__pycache__/__init__.cpython-38.pyc
tests/__pycache__/test_query_valid.cpython-38-pytest-6.0.2.pyc
tests/__pycache__/test_mail.cpython-38-pytest-6.0.2.pyc
This diff is collapsed.
Click to expand it.
tests/test_mail.py
+
6
−
6
View file @
701a3615
import
os
import
sys
import
socket
sys
.
path
.
append
(
os
.
path
.
realpath
(
'
../softwares/
'
))
import
mailer.mail_templates
as
ms
import
mailer.mail_templates
as
ms
# noqa E402
# ensures that the connection is timed out after 1 second (in cases the test is not
# launched on the proper network
import
socket
socket
.
setdefaulttimeout
(
1.0
)
socket
.
setdefaulttimeout
(
1.0
)
def
test_empty_mail
():
assert
ms
.
send_mail
(
""
,
""
)
==
0
assert
ms
.
send_mail
(
""
,
"
1234
"
)
==
0
assert
ms
.
send_mail
(
""
,
""
)
==
0
assert
ms
.
send_mail
(
""
,
"
1234
"
)
==
0
#assert ms.send_mail("julien.david@lipn.univ-paris13.fr","1234") == -1
#
assert ms.send_mail("julien.david@lipn.univ-paris13.fr","1234") == -1
This diff is collapsed.
Click to expand it.
tests/test_query_valid.py
+
2
−
2
View file @
701a3615
...
...
@@ -4,8 +4,8 @@ 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
sys
.
path
.
append
(
os
.
path
.
realpath
(
'
../
'
))
from
server
import
server
as
serv
# noqa E402
data_test1
=
'
{
"
parameters
"
:
""
}
'
...
...
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