コード例 #1
0
    def get_instance(cls):
        if cls.__instance == None:
            try:
                from tinysubscriptions import tiny_subscriptions
            except:
                import tiny_subscriptions

            app = tiny_subscriptions.get_app()

            if app.config['FAKE_MONGO']:
                cls.create_instance(FakeMongoDB())
            else:
                cls.create_instance(PyMongo(app))

        return cls.__instance
コード例 #2
0
    def get_instance(cls):
        if cls.__instance == None:
            try:
                from tinysubscriptions import tiny_subscriptions
            except:
                import tiny_subscriptions

            app = tiny_subscriptions.get_app()

            if app.config['FAKE_MONGO']:
                cls.create_instance(FakeMongoDB())
            else:
                cls.create_instance(PyMongo(app))

        return cls.__instance
コード例 #3
0
 def setUp(self):
     mox.MoxTestBase.setUp(self)
     app = tiny_subscriptions.get_app()
     app.debug = True
     self.app = app.test_client()
コード例 #4
0
 def setUp(self):
     mox.MoxTestBase.setUp(self)
     app = tiny_subscriptions.get_app()
     app.debug = True
     self.app = app.test_client()