def setUpClass(cls): cls.driver = webdriver.Firefox() cls.tempdir = create_random_dir() cls.dropbox = DropboxAPI(cls.tempdir) params = authorize_dropbox_user(cls.driver, cls.dropbox.get_auth_url(), DROPBOX_EMAIL, DROPBOX_PASSWD) access_token, user_id, url_state = cls.dropbox.flow.finish(params) cls.dropbox.build(access_token)
def test_i_can_connect_with_mail_adress_and_password(self): # Given driver = webdriver.Firefox() params = authorize_dropbox_user(driver, self.dropbox.get_auth_url(), DROPBOX_EMAIL, DROPBOX_PASSWD) access_token, user_id, url_state = self.dropbox.flow.finish(params) # When self.dropbox.build(access_token) # Then self.assertTrue(self.dropbox.is_connected()) # Clean driver.quit()