Skip to content

test: add README quickstart search regression test#20

Merged
kriptoburak merged 3 commits into
Xquik-dev:mainfrom
Asritha916:test/readme-quickstart-search
Jul 24, 2026
Merged

test: add README quickstart search regression test#20
kriptoburak merged 3 commits into
Xquik-dev:mainfrom
Asritha916:test/readme-quickstart-search

Conversation

@Asritha916

@Asritha916 Asritha916 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Add an offline regression test for the README search quickstart.

Changes

  • Mock the HTTP response locally.
  • Verify the request method, route, and query parameters.
  • Verify the decoded pagination and tweet response.
  • Make no network requests.

Closes #19

Note

Add regression test for XTwitterScraper.x.tweets.search README quickstart

Adds a pytest test in test_readme_quickstart.py that mocks a GET to /x/tweets/search using respx and verifies that the client sends the correct q and limit query parameters. Also checks that the response is parsed into the expected result fields, including has_next_page and tweet text.

Macroscope summarized facd806.

@kriptoburak kriptoburak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The offline test passes locally and its assertions match the README flow. Three repository requirements remain:

  1. Rebase onto the current Xquik-dev/main branch.
  2. Add the repository's standard SPDX copyright and Apache-2.0 header to tests/test_readme_quickstart.py.
  3. Add a final newline and certify your commit with your own DCO sign-off.

A safe command sequence after editing is:

git fetch https://github.com/Xquik-dev/x-twitter-scraper-python.git main
git rebase FETCH_HEAD
git add tests/test_readme_quickstart.py
git commit --amend --no-edit --signoff
git push --force-with-lease

The Signed-off-by identity must match your commit author. A maintainer cannot certify your contribution. I will rerun the full hosted and local gates after your update.

Signed-off-by: Asritha916 <masritha06@gmail.com>
@Asritha916
Asritha916 force-pushed the test/readme-quickstart-search branch from 693c663 to 424f24b Compare July 24, 2026 13:27
Signed-off-by: kriptoburak <kriptoburak@users.noreply.github.com>
@kriptoburak

Copy link
Copy Markdown
Member

The contributor completed the rebase, SPDX, and author-matching DCO requirements. I added only the missing final newline in signed-off commit 4a0ca25. Ruff, Pyright, mypy, the focused offline test, import verification, and REUSE 389/389 pass. @furkanerday please review the current head after hosted checks complete.

@kriptoburak
kriptoburak requested a review from furkanerday July 24, 2026 13:31
@kriptoburak
kriptoburak dismissed their stale review July 24, 2026 13:31

All requested changes were completed on the current head.

@furkanerday furkanerday left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete diff, description, discussion, repository policies, public contracts, relevant tests, required checks, and commit sign-offs at 4a0ca25. All required checks pass, no unresolved threads remain, and I found no blocking issue.

@kriptoburak
kriptoburak enabled auto-merge (squash) July 24, 2026 21:34
@kriptoburak
kriptoburak requested a review from furkanerday July 24, 2026 21:35
@kriptoburak
kriptoburak merged commit aca63bd into Xquik-dev:main Jul 24, 2026
10 checks passed
@Asritha916

Copy link
Copy Markdown
Contributor Author

Thanks @kriptoburak and @furkanerday for the reviews and guidance throughout this PR. This was my first open-source contribution, and I learned a lot from the process. I really appreciate your time and support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run the Python README quickstart against a fake transport

3 participants