Added a cleaner way to get collection names
Also handles dynamic collection naming - refs #180.
This commit is contained in:
parent
1b0323bc22
commit
f41c5217c6
6 changed files with 130 additions and 73 deletions
|
|
@ -1,6 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
import unittest
|
||||
import pymongo
|
||||
from datetime import datetime, timedelta
|
||||
|
|
@ -27,7 +25,7 @@ class QuerySetTest(unittest.TestCase):
|
|||
"""
|
||||
self.assertTrue(isinstance(self.Person.objects, QuerySet))
|
||||
self.assertEqual(self.Person.objects._collection.name,
|
||||
self.Person._meta['collection'])
|
||||
self.Person._get_collection_name())
|
||||
self.assertTrue(isinstance(self.Person.objects._collection,
|
||||
pymongo.collection.Collection))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue