Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
strass
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hub
strass
Commits
858c7065
Commit
858c7065
authored
3 weeks ago
by
Bryan BRANCOTTE
Browse files
Options
Downloads
Patches
Plain Diff
testfix, create profiles
parent
7bb8033f
No related branches found
No related tags found
1 merge request
!259
stop as soon as error is seen
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/strass/strass_app/tests/test_forms.py
+5
-2
5 additions, 2 deletions
src/strass/strass_app/tests/test_forms.py
with
5 additions
and
2 deletions
src/strass/strass_app/tests/test_forms.py
+
5
−
2
View file @
858c7065
...
@@ -21,10 +21,11 @@ import os
...
@@ -21,10 +21,11 @@ import os
import
pathlib
import
pathlib
import
random
import
random
from
tempfile
import
NamedTemporaryFile
from
tempfile
import
NamedTemporaryFile
from
django.core
import
mail
import
live_settings
from
crispy_forms
import
layout
from
crispy_forms
import
layout
from
django.contrib.auth.models
import
AnonymousUser
from
django.contrib.auth.models
import
AnonymousUser
from
django.core
import
mail
from
django.core.files.uploadedfile
import
SimpleUploadedFile
from
django.core.files.uploadedfile
import
SimpleUploadedFile
from
django.template
import
Template
,
Context
from
django.template
import
Template
,
Context
from
django.test
import
RequestFactory
from
django.test
import
RequestFactory
...
@@ -32,6 +33,7 @@ from freezegun import freeze_time
...
@@ -32,6 +33,7 @@ from freezegun import freeze_time
from
strass_app
import
forms
from
strass_app
import
forms
from
strass_app.forms
import
EmptyForm
from
strass_app.forms
import
EmptyForm
from
strass_app.management.commands
import
load_demo
from
strass_app.tests.test_base_test_case
import
TooledTestCase
from
strass_app.tests.test_base_test_case
import
TooledTestCase
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
@@ -59,6 +61,7 @@ class TestMain(TooledTestCase):
...
@@ -59,6 +61,7 @@ class TestMain(TooledTestCase):
class
TestCandidateForm
(
TooledTestCase
):
class
TestCandidateForm
(
TooledTestCase
):
def
test_pdf_safe_crashes_log_collected
(
self
):
def
test_pdf_safe_crashes_log_collected
(
self
):
load_demo
.
create_profiles
()
mail_count
=
len
(
mail
.
outbox
)
mail_count
=
len
(
mail
.
outbox
)
m
=
random
.
randint
(
1
,
12
)
m
=
random
.
randint
(
1
,
12
)
d
=
random
.
randint
(
1
,
28
)
d
=
random
.
randint
(
1
,
28
)
...
@@ -72,7 +75,7 @@ class TestCandidateForm(TooledTestCase):
...
@@ -72,7 +75,7 @@ class TestCandidateForm(TooledTestCase):
"
first_name
"
:
"
Ada
"
,
"
first_name
"
:
"
Ada
"
,
"
last_name
"
:
"
Lovelace
"
,
"
last_name
"
:
"
Lovelace
"
,
"
email
"
:
"
ada.lovelace@pasteur.fr
"
,
"
email
"
:
"
ada.lovelace@pasteur.fr
"
,
"
profiles
"
:
"
2
"
,
"
profiles
"
:
[
2
]
,
"
motivation
"
:
"
Yes I am !
"
,
"
motivation
"
:
"
Yes I am !
"
,
"
lang
"
:
"
en
"
,
"
lang
"
:
"
en
"
,
},
},
...
...
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