def get_manager(self):
        """
        A provisioned mock collection for testing
        """

        self.collection = Connection().db.collection
        self.collection.insert(copy(self.redirect_one))
        self.collection.insert(copy(self.redirect_two))

        return RedirectManager(self.collection)
Example #2
0
 def setUp(self):
     super(FakePymongoConnectionTest, self).setUp()
     self.conn = Connection()
Example #3
0
 def test__can_create_db_with_path(self):
     conn = Connection('mongodb://localhost')
     self.assertIsNotNone(conn)
Example #4
0
 def test__can_create_db_without_path(self):
     conn = Connection()
     self.assertIsNotNone(conn)