From patchwork Tue Jun 30 08:52:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 489601 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6908A1402C4 for ; Tue, 30 Jun 2015 18:54:34 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4C22B1A2BBD for ; Tue, 30 Jun 2015 18:54:34 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lists.ozlabs.org (Postfix) with ESMTP id 3BB081A24BF for ; Tue, 30 Jun 2015 18:52:24 +1000 (AEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 30 Jun 2015 01:52:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,376,1432623600"; d="scan'208";a="755700189" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 30 Jun 2015 01:52:14 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t5U8qD82030637; Tue, 30 Jun 2015 09:52:13 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id t5U8qD9O020368; Tue, 30 Jun 2015 09:52:13 +0100 Received: (from sfinucan@localhost) by sivswdev01.ir.intel.com with id t5U8qDcr020363; Tue, 30 Jun 2015 09:52:13 +0100 From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 08/11] tests/test_user: Add "profile unlink" tests Date: Tue, 30 Jun 2015 09:52:06 +0100 Message-Id: <1435654329-19960-9-git-send-email-stephen.finucane@intel.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1435654329-19960-1-git-send-email-stephen.finucane@intel.com> References: <1435654329-19960-1-git-send-email-stephen.finucane@intel.com> X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Finucane MIME-Version: 1.0 Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" The 'link' view was not being tested. Resolve this with tests for all paths. Signed-off-by: Stephen Finucane --- patchwork/tests/test_user.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/patchwork/tests/test_user.py b/patchwork/tests/test_user.py index d9aef7e..46e6d09 100644 --- a/patchwork/tests/test_user.py +++ b/patchwork/tests/test_user.py @@ -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):