allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject git commit: [#4957] Preserve tool ordering; update tests
Date Mon, 17 Dec 2012 19:22:32 GMT
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 <tvansteenburgh@gmail.com>
Authored: Mon Dec 17 19:22:14 2012 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
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',


Mime
View raw message