Hey Pranav -- good idea using private_project().
Try something like:
~~~~~
::python
#...
assert not user.pending
assert_is_not_none(user.private_project())
#...
assert user.pending
assert_is_none(user.private_project())
~~~~~
We're using [nose](https://nose.readthedocs.org/en/latest/usage.html) for
testing in Allura. Nose allows for a mixture of assertion styles. You can use
the built-in python **assert**, or any one of the functions from nose.tools
(such as **assert_equals**). The main advantage that something like
assert_equals has over a standard assertion is that it results in a more
readable error message when a failure occurs.
As to why it didn’t work when you tried it -- I’m not sure. Did you have any
error messages?
This should work:
~~~~~
::python
#...
assert not user.pending
assert user.private_project()
#...
assert user.pending
assert user.private_project() is None
~~~~~
If you want to checkout some of the other built-in nose assertions:
~~~~~
::python
import nose
dir(nose.tools) # Or use ipython
~~~~~
---
** [tickets:#8013] New Users should not be displayed in /u/wiki/home until
email is verified **
**Status:** in-progress
**Milestone:** unreleased
**Created:** Fri Oct 30, 2015 06:05 PM UTC by Heith Seewald
**Last Updated:** Wed Dec 16, 2015 03:44 PM UTC
**Owner:** nobody
Right now new users are displayed in '/u/wiki/home' before email validation.
The link for that user will just 404 until email is verified.
This shouldn't apply if `auth.require_email_addr` is set to false in the ini.
---
Sent from forge-allura.apache.org because [email protected] is subscribed
to https://forge-allura.apache.org/p/allura/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://forge-allura.apache.org/p/allura/admin/tickets/options. Or, if this is
a mailing list, you can unsubscribe from the mailing list.