Removed __len__ from queryset (#247)
This commit is contained in:
		| @@ -53,14 +53,14 @@ class TransformTest(unittest.TestCase): | ||||
|                         BlogPost.objects(title=data['title'])._query) | ||||
|         self.assertFalse('title' in | ||||
|                          BlogPost.objects(title=data['title'])._query) | ||||
|         self.assertEqual(len(BlogPost.objects(title=data['title'])), 1) | ||||
|         self.assertEqual(BlogPost.objects(title=data['title']).count(), 1) | ||||
|  | ||||
|         self.assertTrue('_id' in BlogPost.objects(pk=post.id)._query) | ||||
|         self.assertEqual(len(BlogPost.objects(pk=post.id)), 1) | ||||
|         self.assertEqual(BlogPost.objects(pk=post.id).count(), 1) | ||||
|  | ||||
|         self.assertTrue('postComments.commentContent' in | ||||
|                         BlogPost.objects(comments__content='test')._query) | ||||
|         self.assertEqual(len(BlogPost.objects(comments__content='test')), 1) | ||||
|         self.assertEqual(BlogPost.objects(comments__content='test').count(), 1) | ||||
|  | ||||
|         BlogPost.drop_collection() | ||||
|  | ||||
| @@ -79,7 +79,7 @@ class TransformTest(unittest.TestCase): | ||||
|  | ||||
|         self.assertTrue('_id' in BlogPost.objects(pk=data['title'])._query) | ||||
|         self.assertTrue('_id' in BlogPost.objects(title=data['title'])._query) | ||||
|         self.assertEqual(len(BlogPost.objects(pk=data['title'])), 1) | ||||
|         self.assertEqual(BlogPost.objects(pk=data['title']).count(), 1) | ||||
|  | ||||
|         BlogPost.drop_collection() | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user