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 2014/03/25 15:27:18 UTC

[20/50] git commit: [#7267] [#7015] Update test to reflect s/_id/trove_cat_id/

[#7267] [#7015] Update test to reflect s/_id/trove_cat_id/

Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>


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

Branch: refs/heads/db/5995
Commit: cc742e3d8ab4a5ccbf5f7be9457ae888bed48137
Parents: 0e760e8
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Wed Mar 12 18:48:03 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Mar 12 20:03:49 2014 +0000

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_trovecategory.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/cc742e3d/Allura/allura/tests/functional/test_trovecategory.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_trovecategory.py b/Allura/allura/tests/functional/test_trovecategory.py
index b30b63a..a3b2f18 100644
--- a/Allura/allura/tests/functional/test_trovecategory.py
+++ b/Allura/allura/tests/functional/test_trovecategory.py
@@ -37,15 +37,15 @@ class TestTroveCategory(TestController):
             r = self.app.post('/categories/create/', params=dict(categoryname='test'))
 
         category_id = post_event.call_args[0][1]
-        assert_true(isinstance(category_id, ObjectId))
+        assert_true(isinstance(category_id, int))
         assert_equals(post_event.call_args[0][0], 'trove_category_created')
-        category = M.TroveCategory.query.get(_id=category_id)
+        category = M.TroveCategory.query.get(trove_cat_id=category_id)
 
         # Update event
         category.fullname = 'test2'
         session(M.TroveCategory).flush()
         edited_category_id = post_event.call_args[0][1]
-        assert_true(isinstance(edited_category_id, ObjectId))
+        assert_true(isinstance(edited_category_id, int))
         assert_equals(edited_category_id, category_id)
         assert_equals(post_event.call_args[0][0], 'trove_category_updated')
 
@@ -53,7 +53,7 @@ class TestTroveCategory(TestController):
         M.TroveCategory.delete(category)
         session(M.TroveCategory).flush()
         deleted_category_id = post_event.call_args[0][1]
-        assert_true(isinstance(deleted_category_id, ObjectId))
+        assert_true(isinstance(deleted_category_id, int))
         assert_equals(deleted_category_id, category_id)
         assert_equals(post_event.call_args[0][0], 'trove_category_deleted')