You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2013/08/21 17:26:59 UTC

[17/50] git commit: [#3154] ticket:394 Fix test

[#3154] ticket:394 Fix test


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

Branch: refs/heads/db/3154b
Commit: 3e41cb88d282eb517d2a98f7350092985d3a5551
Parents: e2b56bb
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Jul 23 14:19:03 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Aug 21 15:25:55 2013 +0000

----------------------------------------------------------------------
 ForgeLink/forgelink/tests/test_app.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3e41cb88/ForgeLink/forgelink/tests/test_app.py
----------------------------------------------------------------------
diff --git a/ForgeLink/forgelink/tests/test_app.py b/ForgeLink/forgelink/tests/test_app.py
index 2176b10..3290aa2 100644
--- a/ForgeLink/forgelink/tests/test_app.py
+++ b/ForgeLink/forgelink/tests/test_app.py
@@ -18,8 +18,11 @@
 import tempfile
 import json
 
+from nose.tools import assert_equal
+
 from allura.tests import decorators as td
 from allura import model as M
+from allura.lib import helpers as h
 from alluratest.controller import setup_basic_test
 
 
@@ -32,8 +35,9 @@ class TestBulkExport(object):
     def test_bulk_export(self):
         self.project = M.Project.query.get(shortname='test')
         self.link = self.project.app_instance('link')
+        h.set_context(self.project._id, app_config_id=self.link.config._id)
         self.link.config.options['url'] = 'http://sf.net'
         f = tempfile.TemporaryFile()
         self.link.bulk_export(f)
         f.seek(0)
-        assert json.loads(f.read())['url']=='http://sf.net'
\ No newline at end of file
+        assert_equal(json.loads(f.read())['url'], 'http://sf.net')