incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [22/25] git commit: [#6464] Fixed bin counts for GC Tracker importer
Date Wed, 21 Aug 2013 16:06:14 GMT
[#6464] Fixed bin counts for GC Tracker importer

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/b7dbd2fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/b7dbd2fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/b7dbd2fc

Branch: refs/heads/master
Commit: b7dbd2fcf17d233faf496f73d0a890064cc42833
Parents: fa955f4
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Tue Aug 20 21:41:00 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Tue Aug 20 21:41:00 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/google/tracker.py                   | 1 +
 .../forgeimporters/tests/google/functional/test_tracker.py        | 3 ++-
 ForgeImporters/forgeimporters/tests/google/test_tracker.py        | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b7dbd2fc/ForgeImporters/forgeimporters/google/tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/google/tracker.py b/ForgeImporters/forgeimporters/google/tracker.py
index e96678f..8b1747f 100644
--- a/ForgeImporters/forgeimporters/google/tracker.py
+++ b/ForgeImporters/forgeimporters/google/tracker.py
@@ -75,6 +75,7 @@ class GoogleCodeTrackerImporter(ToolImporter):
                 app.globals.last_ticket_num = self.max_ticket_num
                 ThreadLocalORMSession.flush_all()
             g.post_event('project_updated')
+            app.globals.invalidate_bin_counts()
             return app
         finally:
             M.session.artifact_orm_session._get().skip_mod_date = False

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b7dbd2fc/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py b/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py
index 813a8b0..184f7fd 100644
--- a/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py
+++ b/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py
@@ -49,7 +49,8 @@ class TestGCTrackerImporter(TestCase):
     def _make_ticket(self, issue, issue_id=1):
         self.assertIsNone(self.project.app_instance('test-issue'))
         with mock.patch.object(base.h, 'urlopen') as urlopen,\
-             mock.patch.object(google.tracker, 'GoogleCodeProjectExtractor') as GPE:
+             mock.patch.object(google.tracker, 'GoogleCodeProjectExtractor') as GPE,\
+             mock.patch('forgetracker.tasks.update_bin_counts') as ubc:
             urlopen.side_effect = lambda req, **kw: mock.Mock(read=req.get_full_url)
             GPE.iter_issues.return_value = [(issue_id, issue)]
             gti = google.tracker.GoogleCodeTrackerImporter()

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b7dbd2fc/ForgeImporters/forgeimporters/tests/google/test_tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/google/test_tracker.py b/ForgeImporters/forgeimporters/tests/google/test_tracker.py
index 48ddc44..4a7c28f 100644
--- a/ForgeImporters/forgeimporters/tests/google/test_tracker.py
+++ b/ForgeImporters/forgeimporters/tests/google/test_tracker.py
@@ -77,6 +77,7 @@ class TestTrackerImporter(TestCase):
             ])
         self.assertEqual(app.globals.last_ticket_num, 100)
         g.post_event.assert_called_once_with('project_updated')
+        app.globals.invalidate_bin_counts.assert_called_once_with()
 
     def test_custom_fields(self):
         importer = tracker.GoogleCodeTrackerImporter()


Mime
View raw message