Пример #1
0
 def setUp(self):
     from pymongres import MongresClient
     client = MongresClient()
     self.posts = client.pymongres_test.posts
     self.post_id = self.posts.insert({
         "author":
         "Mike",
         "text":
         "My first blog post!",
         "tags": ["mongodb", "python", "pymongo"],
         "date":
         datetime.utcnow(),
     })
Пример #2
0
 def setUp(self):
     from pymongres import MongresClient
     client = MongresClient()
     self.posts = client.pymongres_test.posts
     self.posts.insert([{
         "author": "Mike",
         "text": "Another post!",
         "tags": ["bulk", "insert"],
         "date": datetime(2009, 11, 12, 11, 14)
     }, {
         "author": "Eliot",
         "title": "MongoDB is fun",
         "text": "and pretty easy too!",
         "date": datetime(2009, 11, 10, 10, 45)
     }])
Пример #3
0
 def setUp(self):
     from pymongres import MongresClient
     client = MongresClient()
     self.posts = client.pymongres_test.posts
Пример #4
0
 def setUp(self):
     from pymongres import MongresClient
     self.client = MongresClient()
Пример #5
0
 def test_create_client(self):
     from pymongres import MongresClient
     client = MongresClient()
Пример #6
0
 def setUp(self):
     from pymongres import MongresClient
     self.client = MongresClient()
     self.db = self.client.pymongres_test