Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-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 5B873D67B for ; Mon, 17 Dec 2012 19:22:33 +0000 (UTC) Received: (qmail 34707 invoked by uid 500); 17 Dec 2012 19:22:33 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 34685 invoked by uid 500); 17 Dec 2012 19:22:33 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 34668 invoked by uid 99); 17 Dec 2012 19:22:33 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Dec 2012 19:22:33 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id DC96B81DEBD; Mon, 17 Dec 2012 19:22:32 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tvansteenburgh@apache.org To: allura-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: [#4957] Preserve tool ordering; update tests Message-Id: <20121217192232.DC96B81DEBD@tyr.zones.apache.org> Date: Mon, 17 Dec 2012 19:22:32 +0000 (UTC) Updated Branches: refs/heads/tv/4957 e719ceb0f -> 1e34809b3 [#4957] Preserve tool ordering; update tests Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/1e34809b Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1e34809b Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1e34809b Branch: refs/heads/tv/4957 Commit: 1e34809b3c470fcce6af0b35c9e56d21439fb84f Parents: e719ceb Author: Tim Van Steenburgh Authored: Mon Dec 17 19:22:14 2012 +0000 Committer: Tim Van Steenburgh Committed: Mon Dec 17 19:22:14 2012 +0000 ---------------------------------------------------------------------- Allura/allura/model/project.py | 4 ++-- Allura/allura/tests/functional/test_admin.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1e34809b/Allura/allura/model/project.py ---------------------------------------------------------------------- diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py index 29b5bc8..02b3c2f 100644 --- a/Allura/allura/model/project.py +++ b/Allura/allura/model/project.py @@ -433,9 +433,9 @@ class Project(MappedClass, ActivityNode, ActivityObject): return [e['entry'] for e in entries] def grouped_sitemap(self): - from collections import Counter + from collections import Counter, OrderedDict sitemap = self.sitemap() - seen_types = dict() + seen_types = OrderedDict() counts = Counter([e.tool_name.lower() for e in sitemap if e.tool_name]) for e in sitemap: if not e.tool_name: http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1e34809b/Allura/allura/tests/functional/test_admin.py ---------------------------------------------------------------------- diff --git a/Allura/allura/tests/functional/test_admin.py b/Allura/allura/tests/functional/test_admin.py index 656f1c9..44b09ec 100644 --- a/Allura/allura/tests/functional/test_admin.py +++ b/Allura/allura/tests/functional/test_admin.py @@ -103,11 +103,11 @@ class TestProjectAdmin(TestController): r = self.app.get('/p/test/test-tool/Home/') active_link = r.html.findAll('span',{'class':'diamond'}) assert len(active_link) == 1 - assert active_link[0].parent['href'] == '/p/test/test-tool/' + assert active_link[0].parent['href'] == '/p/test/_list/wiki' r = self.app.get('/p/test/test-tool2/Home/') active_link = r.html.findAll('span',{'class':'diamond'}) assert len(active_link) == 1 - assert active_link[0].parent['href'] == '/p/test/test-tool2/' + assert active_link[0].parent['href'] == '/p/test/_list/wiki' # check can't create dup tool r = self.app.post('/admin/update_mounts', params={ 'new.install':'install',