@@ -30,15 +30,16 @@ def _confirmation_url(conf):
return reverse('patchwork.views.confirm', kwargs = {'key': conf.key})
class TestUser(object):
- username = 'testuser'
- email = 'test@example.com'
- secondary_email = 'test2@example.com'
- password = None
- def __init__(self):
+ def __init__(self, username='testuser', email='test@example.com',
+ secondary_email='test2@example.com'):
+ self.username = username
+ self.email = email
+ self.secondary_email = secondary_email
self.password = User.objects.make_random_password()
- self.user = User.objects.create_user(self.username,
- self.email, self.password)
+ self.user = User.objects.create_user(
+ self.username, self.email, self.password)
+
class UserPersonRequestTest(TestCase):
def setUp(self):
The 'link' view was not being tested. Resolve this with tests for all paths. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com> --- patchwork/tests/test_user.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)