Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bryan BRANCOTTE
django-basetheme-bootstrap
Commits
c213eef6
Commit
c213eef6
authored
Oct 05, 2020
by
Bryan BRANCOTTE
Browse files
fixe test for django 3.1
parent
4ef943e6
Pipeline
#38951
passed with stage
in 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
basetheme_bootstrap/tests.py
View file @
c213eef6
...
...
@@ -143,6 +143,7 @@ class SignUpWithFirstLastNameRequiredTests(TestCase):
@
override_settings
(
BASETHEME_BOOTSTRAP_VALIDATE_EMAIL_BEFORE_ACTIVATION
=
True
,
PASSWORD_RESET_TIMEOUT_DAYS
=
1
,
PASSWORD_RESET_TIMEOUT
=
60
*
60
*
24
,
)
class
SignUpWithValidationTests
(
TestCase
):
...
...
@@ -200,7 +201,6 @@ class SignUpWithValidationTests(TestCase):
self
.
assertEqual
(
len
(
m
),
1
)
def
test_activate_too_late_with_user_pending_resend_email
(
self
):
get_user_model
().
objects
.
create
(
username
=
"toto"
)
actual_account_activation_token
=
tokens
.
account_activation_token
class
MockedTokenGenerator
(
tokens
.
TokenGenerator
):
...
...
@@ -209,6 +209,11 @@ class SignUpWithValidationTests(TestCase):
# Used for mocking in tests
return
date
.
today
()
-
timedelta
(
days
=
2
)
def
_now
(
self
):
from
datetime
import
datetime
,
timedelta
# Used for mocking in tests
return
datetime
.
now
()
-
timedelta
(
days
=
2
)
tokens
.
account_activation_token
=
MockedTokenGenerator
()
user_count
=
get_user_model
().
objects
.
count
()
...
...
Write
Preview
Markdown
is supported
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