Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Py3.6 test_user.py fail re string interpretation #2582 #2584

Conversation

phillxnet
Copy link
Member

Modify our test to expect the Py3.6 output from the Django upstream validation we use on our user.email field: removing the explicit unicode designator that no longer appears.

Fixes #2582

Testing

Before patch

buildvm:/opt/rockstor/src/rockstor/storageadmin # poetry run django-admin test -v 2 -p test_user.py
...
test_email_validation (rockstor.storageadmin.tests.test_user.UserTests) ... FAIL
...

======================================================================
FAIL: test_email_validation (rockstor.storageadmin.tests.test_user.UserTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/rockstor/src/rockstor/storageadmin/tests/test_user.py", line 274, in test_email_validation
    response.data[0], "{'email': [u'Enter a valid email address.']}"
AssertionError: "{'email': ['Enter a valid email address.']}" != "{'email': [u'Enter a valid email address.']}"
- {'email': ['Enter a valid email address.']}
+ {'email': [u'Enter a valid email address.']}
?            +

----------------------------------------------------------------------
Ran 8 tests in 1.270s

FAILED (failures=1)

After patch

buildvm:/opt/rockstor/src/rockstor/storageadmin # poetry run django-admin test -v 2 -p test_user.py
...
test_email_validation (rockstor.storageadmin.tests.test_user.UserTests) ... ok
...
----------------------------------------------------------------------
Ran 8 tests in 1.264s

OK

Modify our test to expect the Py3.6 output from the
Django upstream validation we use on our user.email
field: removing the explicit unicode designator that
no longer appears.
@phillxnet phillxnet merged commit b04fb03 into rockstor:testing Jun 7, 2023
@phillxnet phillxnet deleted the 2582_Py3.6_test_user.py_fail_re_string_interpretation branch June 7, 2023 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant