conftest.py 517 B

123456789101112131415161718192021222324252627
  1. import pytest
  2. from click.testing import CliRunner
  3. from twhatter.api import ApiUser
  4. from bs4 import BeautifulSoup
  5. @pytest.fixture
  6. def cli_runner():
  7. """Runner for Click"""
  8. return CliRunner()
  9. @pytest.fixture(scope="session")
  10. def user():
  11. return "the_english_way"
  12. @pytest.fixture(scope="session")
  13. def tweet_limit():
  14. return 10
  15. @pytest.fixture(scope="session")
  16. def raw_html_user_initial_page(user):
  17. a = ApiUser(user)
  18. response = a.get_initial()
  19. return BeautifulSoup(response.text, "lxml")