incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject git commit: [#5230] fix test failure
Date Tue, 06 Nov 2012 22:20:31 GMT
Updated Branches:
  refs/heads/master 191ef688f -> b39068f3c


[#5230] fix test failure


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

Branch: refs/heads/master
Commit: b39068f3cbd71c83a38845eaee57481ec5b68d2a
Parents: 191ef68
Author: Dave Brondsema <dbrondsema@geek.net>
Authored: Tue Nov 6 22:20:24 2012 +0000
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Tue Nov 6 22:20:24 2012 +0000

----------------------------------------------------------------------
 Allura/allura/tests/test_tasks.py |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b39068f3/Allura/allura/tests/test_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_tasks.py b/Allura/allura/tests/test_tasks.py
index 334d08c..66a5eea 100644
--- a/Allura/allura/tests/test_tasks.py
+++ b/Allura/allura/tests/test_tasks.py
@@ -33,13 +33,11 @@ class TestRepoTasks(unittest.TestCase):
     @mock.patch('allura.tasks.repo_tasks.g.post_event')
     def test_clone_posts_event_on_failure(self, post_event, app):
         fake_source_url = 'fake_source_url'
-        fake_traceback = 'fake_traceback'
         app.repo.init_as_clone.side_effect = Exception(fake_traceback)
-        try:
-            repo_tasks.clone(None, None, fake_source_url)
-        except:
-            pass
-        post_event.assert_any_call('repo_clone_task_failed', fake_source_url, fake_traceback)
+        repo_tasks.clone(None, None, fake_source_url)
+        assert_equal(post_event.call_args[0][0], 'repo_clone_task_failed')
+        assert_equal(post_event.call_args[0][1], fake_source_url)
+        # ignore args[2] which is a traceback string
 
 
 class TestEventTasks(unittest.TestCase):


Mime
View raw message