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(), })
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) }])
def setUp(self): from pymongres import MongresClient client = MongresClient() self.posts = client.pymongres_test.posts
def setUp(self): from pymongres import MongresClient self.client = MongresClient()
def test_create_client(self): from pymongres import MongresClient client = MongresClient()
def setUp(self): from pymongres import MongresClient self.client = MongresClient() self.db = self.client.pymongres_test