Пример #1
0
 def setUp(self):
     app.config['TESTING'] = True
     app.config['WTF_CSRF_ENABLED'] = False
     app.config['DEBUG'] = False
     app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + self.TEST_DB
     self.app = app.test_client()
     db.drop_all()
     db.create_all()
Пример #2
0
 def setUp(self):
     self.driver = webdriver.Chrome(
         os.getcwd() +
         '/whiskedinRESTAPI/whiskedinRESTAPI/Drivers/chromedriver')
     self.wait = WebDriverWait(self.driver, 10)
     db.drop_all()
     db.create_all()
     self.driver.get('http://whiskeding.herokuapp.com')
Пример #3
0
 def setUp(self):
     chrome_options = Options()
     chrome_options.add_argument("--headless")
     chrome_options.add_argument("--window-size=1920x1080")
     self.driver = webdriver.Chrome(
         chrome_options=chrome_options,
         executable_path=os.getcwd() +
         '/whiskedinRESTAPI/whiskedinRESTAPI/Drivers/chromedriver')
     self.wait = WebDriverWait(self.driver, 10)
     db.drop_all()
     db.create_all()
     self.driver.get(self.deployment_url)
Пример #4
0
 def setUp(self):
     app.config['TESTING'] = True
     app.config['WTF_CSRF_ENABLED'] = False
     app.config['DEBUG'] = False
     app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + self.TEST_DB
     self.app = app.test_client()
     db.drop_all()
     db.create_all()
     self.user = self.create_test_user()
     self.headers = {'Content-Type': 'application/json'}
     self.whisky_dict = {
         'name': 'name',
         'company': 'company',
         'type': 'type',
         'age': 12,
         'origin': 'origin',
         'flavor': 'flavor',
         'description': 'description',
         'rating': 5,
         'created_by': self.user.uid
     }
Пример #5
0
 def tearDown(self):
     db.drop_all()
     db.create_all()
Пример #6
0
 def tearDown(self):
     db.drop_all()
     db.create_all()
     self.driver.quit()