tests: add more checks in registration test (#41792)
This commit is contained in:
parent
4f831fe4d8
commit
632069c775
|
@ -15,6 +15,8 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from datetime import date
|
||||
|
||||
from django.contrib.auth import get_user_model, REDIRECT_FIELD_NAME
|
||||
from django.urls import reverse
|
||||
from django.utils.http import urlquote
|
||||
|
@ -714,6 +716,12 @@ def test_registration_no_email_full_profile_no_password(app, db, rf, mailoutbox)
|
|||
response = app.get(link)
|
||||
assert response.location == '/'
|
||||
assert User.objects.count() == 1
|
||||
user = User.objects.get()
|
||||
assert user.first_name == 'John'
|
||||
assert user.last_name == 'Doe'
|
||||
assert user.attributes.birthdate == date(1981, 1, 1)
|
||||
assert user.email == 'john.doe2@example.com'
|
||||
assert user.email_verified is True
|
||||
|
||||
|
||||
def test_registration_link_unique_use(app, db, mailoutbox):
|
||||
|
|
Loading…
Reference in New Issue