def setUp(self):
        self.app = create_app()

        self.app.config['SECRET_KEY'] = 'sekrit!'

        self.app_context = self.app.app_context()
        self.app_context.push()
        self.client = self.app.test_client()
Esempio n. 2
0
    def setUp(self):
        self.app = create_app()

        self.app.config['SECRET_KEY'] = 'sekrit!'

        self.app_context = self.app.app_context()
        self.app_context.push()
        self.client = self.app.test_client()

        mongo_client = pymongo.MongoClient(
            "mongodb+srv://news:[email protected]/test?retryWrites=true"
        )
        self.db = mongo_client["newsapp"]

        self.user_with_history = 'testing_username_with_history'
        self.user_with_history_2 = 'testing_username_with_history_2'
        self.user_no_history = 'testing_username_no_history'
Esempio n. 3
0
 def setUp(self):
     self.app = create_app()
     self.app_context = self.app.app_context()
     self.app_context.push()
     self.client = self.app.test_client()