I have worked through the lesson up to and including Unique Email Addresses and keep getting the errors below when running the pytest 04_handle_constraint_errors__test.py:
FAILED 04_handle_constraint_errors__test.py::test_unique_constraint - assert None is not None
FAILED 04_handle_constraint_errors__test.py::test_validation_error - Failed: DID NOT RAISE <class 'api.exceptions.validation.ValidationException'>
I have also checked out to the 04-handle-constraint-errors branch and see the same errors when running the test. I am not able to complete my training plan without checking off this task.
Also, when running the CREATE CONSTRIANT UserEmailUnique command in the sandbox as directed in the lesson, I am getting the following error:
Neo.DatabaseError.Schema.ConstraintCreationFailed
Unable to create Constraint( name='UserEmailUnique', type='UNIQUENESS', schema=(:User {email}) ):
Both Node(33890) and Node(33891) have the label `User` and property `email` = '1592@neo4j.com'
The constraint cannot be enforced once you have something on the DB that is conflicting with it. If you try to delete one of the nodes that have the email : "1592@neo4j.com", or other nodes that have the same email I think the creation of the constraints would be successful.