allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject git commit: [#6788] Fixed errant tracker config keys causing error on 2nd-gen reimport
Date Tue, 19 Nov 2013 23:12:24 GMT
Updated Branches:
  refs/heads/master 8b4b74c4e -> dcdb4ca77


[#6788] Fixed errant tracker config keys causing error on 2nd-gen reimport

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/dcdb4ca7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/dcdb4ca7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/dcdb4ca7

Branch: refs/heads/master
Commit: dcdb4ca77689917f10725fabdb078fc33987fc13
Parents: 8b4b74c
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Mon Nov 11 20:01:37 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Nov 19 23:12:04 2013 +0000

----------------------------------------------------------------------
 .../forgetracker/tests/functional/test_root.py    | 18 ++++++++++++++++--
 ForgeTracker/forgetracker/tracker_main.py         |  4 ++--
 2 files changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dcdb4ca7/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index be2a0b2..8e247ac 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -28,11 +28,11 @@ import mock
 import PIL
 from mock import patch
 from nose.tools import assert_true, assert_false, assert_equal, assert_in
-from nose.tools import assert_raises, assert_not_in
+from nose.tools import assert_raises, assert_not_in, assert_items_equal
 from formencode.variabledecode import variable_encode
 from pylons import tmpl_context as c
 
-from alluratest.controller import TestController
+from alluratest.controller import TestController, setup_basic_test
 from allura import model as M
 from forgewiki import model as wm
 from forgetracker import model as tm
@@ -2805,3 +2805,17 @@ class TestNotificationEmailGrouping(TrackerTestController):
         assert_equal(email.kwargs.message_id, ticket.url() + reply._id)
         assert_equal(email.kwargs.in_reply_to, top_level_comment_msg_id)
         assert_equal(email.kwargs.references, [ticket.message_id(), top_level_comment_msg_id])
+
+
+def test_status_passthru():
+    setup_basic_test()
+    c.project = M.Project.query.get(shortname='test')
+    c.user = M.User.by_username('test-admin')
+    c.project.install_app('tickets', mount_point='tsp',
+            open_status_names='foo bar', closed_status_names='qux baz')
+    ThreadLocalORMSession.flush_all()
+    app = c.project.app_instance('tsp')
+    assert_items_equal(app.globals.set_of_open_status_names, ['foo', 'bar'])
+    assert_items_equal(app.globals.set_of_closed_status_names, ['qux', 'baz'])
+    assert_not_in('open_status_names', app.config.options)
+    assert_not_in('closed_status_names', app.config.options)

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dcdb4ca7/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index 63e876b..4edc9c6 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -384,8 +384,8 @@ class ForgeTrackerApp(Application):
             ]
         self.globals = TM.Globals(app_config_id=c.app.config._id,
             last_ticket_num=0,
-            open_status_names=self.config.options.get('open_status_names', 'open unread accepted
pending'),
-            closed_status_names=self.config.options.get('closed_status_names', 'closed wont-fix'),
+            open_status_names=self.config.options.pop('open_status_names', 'open unread accepted
pending'),
+            closed_status_names=self.config.options.pop('closed_status_names', 'closed wont-fix'),
             custom_fields=[dict(
                     name='_milestone',
                     label='Milestone',


Mime
View raw message