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_shares.py & test_snapshot.py re boolean type #2580

Closed
2 tasks done
phillxnet opened this issue Jun 7, 2023 · 1 comment
Closed
2 tasks done

Py3.6 test_shares.py & test_snapshot.py re boolean type #2580

phillxnet opened this issue Jun 7, 2023 · 1 comment
Assignees

Comments

@phillxnet
Copy link
Member

phillxnet commented Jun 7, 2023

Post #2567 in testing branch we have the following similar test failures related to types:

buildvm:/opt/rockstor/src/rockstor # poetry run django-admin test -v 2
...
======================================================================
FAIL: test_create (rockstor.storageadmin.tests.test_shares.ShareTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/rockstor/src/rockstor/storageadmin/tests/test_shares.py", line 344, in test_create
    self.assertEqual(response9.data[0], e_msg7)
AssertionError: "Replica must be a boolean, not (<class 'str'>)." != "Replica must be a boolean, not (<type 'unicode'>)."
- Replica must be a boolean, not (<class 'str'>).
?                                   ^^^^^^^^^
+ Replica must be a boolean, not (<type 'unicode'>).
?                                  +++++++++ ^^^


======================================================================
FAIL: test_post_requests_2 (rockstor.storageadmin.tests.test_snapshot.SnapshotTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/rockstor/src/rockstor/storageadmin/tests/test_snapshot.py", line 156, in test_post_requests_2
    self.assertEqual(response.data[0], e_msg)
AssertionError: "Element 'uvisible' must be a boolean, not (<class 'str'>)." != "Element 'uvisible' must be a boolean, not (<type 'unicode'>)."
- Element 'uvisible' must be a boolean, not (<class 'str'>).
?                                              ^^^^^^^^^
+ Element 'uvisible' must be a boolean, not (<type 'unicode'>).
?    
  • test_shares.py", line 344, in test_create
  • test_snapshot.py", line 156, in test_post_requests_2
@phillxnet phillxnet self-assigned this Jun 7, 2023
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Jun 7, 2023
Modify testing code to expect new <class 'str'> in test data
presented rather than our prior Py2.7 interpretation by tested
code of test data as <type 'unicode'>  Other tests using the
proper boolean type pass as expected so that we are only
looking at interpretation of invalid test data type here.

But it is important to note that this type/class change is
in play re our Py3.6 base.
phillxnet added a commit that referenced this issue Jun 7, 2023
…est_snapshot.py_re_boolean_type

Py3.6 test_shares.py & test_snapshot.py re boolean type #2580
@phillxnet
Copy link
Member Author

Closing as:
Fixed by #2581

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

No branches or pull requests

1 participant