From commits-return-876-apmail-climate-commits-archive=climate.apache.org@climate.incubator.apache.org Sat Feb 1 23:57:45 2014 Return-Path: X-Original-To: apmail-climate-commits-archive@minotaur.apache.org Delivered-To: apmail-climate-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D6E80CA2C for ; Sat, 1 Feb 2014 23:57:45 +0000 (UTC) Received: (qmail 92960 invoked by uid 500); 1 Feb 2014 23:57:45 -0000 Delivered-To: apmail-climate-commits-archive@climate.apache.org Received: (qmail 92927 invoked by uid 500); 1 Feb 2014 23:57:45 -0000 Mailing-List: contact commits-help@climate.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@climate.incubator.apache.org Delivered-To: mailing list commits@climate.incubator.apache.org Received: (qmail 92920 invoked by uid 99); 1 Feb 2014 23:57:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Feb 2014 23:57:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Feb 2014 23:57:44 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id ED4462388ADA; Sat, 1 Feb 2014 23:57:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1563519 - /incubator/climate/trunk/ocw-ui/backend/tests/test_directory_helpers.py Date: Sat, 01 Feb 2014 23:57:14 -0000 To: commits@climate.incubator.apache.org From: joyce@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140201235714.ED4462388ADA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: joyce Date: Sat Feb 1 23:57:14 2014 New Revision: 1563519 URL: http://svn.apache.org/r1563519 Log: CLIMATE-326 - Add duplicate slash removal test - Add directory_helpers._get_clean_directory_path duplicate slash removal test Modified: incubator/climate/trunk/ocw-ui/backend/tests/test_directory_helpers.py Modified: incubator/climate/trunk/ocw-ui/backend/tests/test_directory_helpers.py URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw-ui/backend/tests/test_directory_helpers.py?rev=1563519&r1=1563518&r2=1563519&view=diff ============================================================================== --- incubator/climate/trunk/ocw-ui/backend/tests/test_directory_helpers.py (original) +++ incubator/climate/trunk/ocw-ui/backend/tests/test_directory_helpers.py Sat Feb 1 23:57:14 2014 @@ -17,3 +17,10 @@ class TestDirectoryPathCleaner(unittest. def test_valid_directory_path(self): clean_path = _get_clean_directory_path(self.PATH_LEADER, '/bar') self.assertEquals(clean_path, self.VALID_CLEAN_DIR) + + def test_duplicate_slash_removal(self): + clean_path = _get_clean_directory_path(self.PATH_LEADER, '//bar') + self.assertEquals(clean_path, self.VALID_CLEAN_DIR) + + clean_path = _get_clean_directory_path(self.PATH_LEADER, '/////bar') + self.assertEquals(clean_path, self.VALID_CLEAN_DIR)