from selenium import webdriver
import requests
import pytest

from quillbot.quillbot_selenium.common import CommonTools
from quillbot.quillbot_selenium.quillbot_scripts import Quillbot
from quillbot.settings import BROWSER_OPTIONS, GECKODRIVER_PATH, QUILLBOT_DATA

driver = webdriver.Firefox(executable_path=GECKODRIVER_PATH, options=BROWSER_OPTIONS)
url = QUILLBOT_DATA["url"]
login = QUILLBOT_DATA["login"]
password = QUILLBOT_DATA["password"]
common = CommonTools(driver)

input_data = "Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. \n/nTFind out more about what you can do to help shape the future. <p>Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nTCustomers can now get a unified, real-time experience thanks to Adobe Experience Platform. Content Management, Digital Strategy The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>\n/nTDigital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience The Adobe Summit EMEA recognized Netcentric's \n/nTachievements.\n/nTThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.\n/nTThe Developers' Circle is a group of people who work together on projects."
input_data2 = "Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. \n/nTFind out more about what you can do to help shape the future. <p>Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nTCustomers can now get a unified, real-time experience thanks to Adobe Experience Platform. Content Management, Digital Strategy The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>\n/nTDigital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience The Adobe Summit EMEA recognized Netcentric's \n/nTachievements.\n/nTThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.\n/nTThe Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>Digital Strategy, User Experience Digital Strategy, User Experience\n/nTThe Adobe Summit EMEA recognized Netcentric's achievements. News, Digital Strategy Thanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.  The Developers' Circle is a group of people who work together on projects. This year, we hope to see you at Adobe Summit EMEA. <p> Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. \n/nTFind out more about what you can do to help shape the future. <p>Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nTCustomers can now get a unified, real-time experience thanks to Adobe Experience Platform. Content Management, Digital Strategy The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>\n/nTDigital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience The Adobe Summit EMEA recognized Netcentric's \n/nTachievements.\n/nTThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.\n/nTThe Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>Digital Strategy, User Experience Digital Strategy, User Experience\n/nTThe Adobe Summit EMEA recognized Netcentric's achievements. News, Digital Strategy Thanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.  The Developers' Circle is a group of people who work together on projects. This year, we hope to see you at Adobe Summit EMEA. <p> Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. \n/nTFind out more about what you can do to help shape the future. <p>Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nTCustomers can now get a unified, real-time experience thanks to Adobe Experience Platform. Content Management, Digital Strategy The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>\n/nTDigital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience The Adobe Summit EMEA recognized Netcentric's \n/nTachievements.\n/nTThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.\n/nTThe Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>Digital Strategy, User Experience Digital Strategy, User Experience\n/nTThe Adobe Summit EMEA recognized Netcentric's achievements. News, Digital Strategy Thanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.  The Developers' Circle is a group of people who work together on projects. This year, we hope to see you at Adobe Summit EMEA. <p> Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. \n/nTFind out more about what you can do to help shape the future. <p>Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nTCustomers can now get a unified, real-time experience thanks to Adobe Experience Platform. Content Management, Digital Strategy The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>\n/nTDigital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience The Adobe Summit EMEA recognized Netcentric's \n/nTachievements.\n/nTThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.\n/nTThe Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>Digital Strategy, User Experience Digital Strategy, User Experience\n/nTThe Adobe Summit EMEA recognized Netcentric's achievements. News, Digital Strategy Thanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.  The Developers' Circle is a group of people who work together on projects. This year, we hope to see you at Adobe Summit EMEA. <p> Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. \n/nTFind out more about what you can do to help shape the future. <p>Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nTCustomers can now get a unified, real-time experience thanks to Adobe Experience Platform. Content Management, Digital Strategy The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>\n/nTDigital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience The Adobe Summit EMEA recognized Netcentric's \n/nTachievements.\n/nTThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.\n/nTThe Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>Digital Strategy, User Experience Digital Strategy, User Experience\n/nTThe Adobe Summit EMEA recognized Netcentric's achievements. News, Digital Strategy Thanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.  The Developers' Circle is a group of people who work together on projects. This year, we hope to see you at Adobe Summit EMEA. <p> Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. \n/nTFind out more about what you can do to help shape the future. <p>Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nTCustomers can now get a unified, real-time experience thanks to Adobe Experience Platform. Content Management, Digital Strategy The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>\n/nTDigital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience The Adobe Summit EMEA recognized Netcentric's \n/nTachievements.\n/nTThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.\n/nTThe Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>Digital Strategy, User Experience Digital Strategy, User Experience\n/nTThe Adobe Summit EMEA recognized Netcentric's achievements. News, Digital Strategy Thanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.  The Developers' Circle is a group of people who work together on projects. This year, we hope to see you at Adobe Summit EMEA. <p> Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. \n/nTFind out more about what you can do to help shape the future. <p>Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy\n/nTCustomers can now get a unified, real-time experience thanks to Adobe Experience Platform. Content Management, Digital Strategy The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>\n/nTDigital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience The Adobe Summit EMEA recognized Netcentric's \n/nTachievements.\n/nTThanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.\n/nTThe Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>Digital Strategy, User Experience Digital Strategy, User Experience\n/nTThe Adobe Summit EMEA recognized Netcentric's achievements. News, Digital Strategy Thanks to Adobe Experience Platform, customers may now get a unified, real-time experience. Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing.  The Developers' Circle is a group of people who work together on projects. This year, we hope to see you at Adobe Summit EMEA. <p> Digital Strategy, User Experience With an Adobe Experience Platform SDK for Project Firefly, I'm contributing to Adobe's open source universe. Digital Strategy, User Experience Netcentric's accomplishments were honored at the Adobe Summit EMEA. News, Digital Strategy Digital Strategy, Content Management At the 2017 Adobe Symposium, we'll be shaping the future of digital marketing. The Developers' Circle is a group of people who work together on projects. Find out more about what you can do to help shape the future. This year, we hope to see you at Adobe Summit EMEA. <p>"


class TestQuillbot:
    def test_quillbot_response(self):
        response = requests.get(url)
        assert response.status_code == 200

    def test_paraphrase_all_content_free(self):
        bot = Quillbot()
        res = bot.paraphrase_all_content_free(input_data)
        bot.driver.quit()

        assert type(res) is str
        assert len(res) % len(input_data) >= len(input_data)*0.7

    def test_paraphrase_all_content(self):
        bot = Quillbot()
        bot.authorize_user()
        res = bot.paraphrase_all_content(input_data2)
        bot.driver.quit()

        assert type(res) is str
        assert len(res) % len(input_data2) >= len(input_data)*0.7
