Esempio n. 1
0
 def setUp(self):
     """ Runs before each test """
     disconnect('default')
     global db
     global testdb_name  # For concurrency
     millis = int(round(time.time() * 1000))
     testdb_name = "testdb" + str(millis)
     DB_URI = "mongodb+srv://suppliers:[email protected]/" + testdb_name + "?retryWrites=true&w=majority"
     db = connect(testdb_name, host=DB_URI)
     db.drop_database(testdb_name)
     self.app = app.test_client()
Esempio n. 2
0
 def setUp(self):
     """ Runs before each test """
     db.drop_all()  # clean up the last tests
     db.create_all()  # create new tables
     self.app = app.test_client()
Esempio n. 3
0
 def setUp(self):
     """ This runs before each test """
     db.drop_all()  # clean the last tests
     db.create_all()  # create new tables
     self.app = app.test_client()
     self.headers = {'X-Api-Key': app.config['API_KEY']}
Esempio n. 4
0
 def setUp(self):
     """ This runs before each test """
     self.app = app.test_client()
Esempio n. 5
0
 def setUp(self):
     """Runs before each test"""
     db.drop_all()
     db.create_all()
     self.app = app.test_client()
Esempio n. 6
0
 def setUp(self):
     """ Runs before each test """
     Inventory.init_db("test")
     Inventory.remove_all()
     self.app = app.test_client()
Esempio n. 7
0
 def setUp(self):
     """ Runs before each test """
     init_db()
     DB.drop_all()
     DB.create_all()
     self.app = app.test_client()
 def setUp(self):
     """ Runs before each test """
     Promotion.init_db("test")
     Promotion.remove_all()
     self.app = app.test_client()
Esempio n. 9
0
 def setUp(self):
     self.app = app.test_client()
     initialize_logging(logging.INFO)
     Supplier.init_db("test")
     Supplier.remove_all()
Esempio n. 10
0
 def setUp(self):
     """ Runs before each test """
     self.headers = {'X-Api-Key': app.config['API_KEY']}
     db.create_all()  # create new tables
     self.app = app.test_client()
     self.headers = {'X-Api-Key': app.config['API_KEY']}