Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use mocking for S3 tests that currently need server credentials #4804

Merged
merged 8 commits into from Oct 6, 2020

Conversation

Gallaecio
Copy link
Member

@Gallaecio Gallaecio commented Sep 21, 2020

Fixes #1790

I used the built-in mocking mechanism from botocore, the client library we use.

  • tests/test_downloader_handlers.py::S3TestCase::test_request_signing5 (removed, only meant to work on Python 2)
  • tests/test_feedexport.py::S3FeedStorageTest::test_store
  • tests/test_feedexport.py::BatchDeliveriesTest::test_s3_export
  • tests/test_pipeline_files.py::TestS3FilesStore::test_persist

@Gallaecio Gallaecio marked this pull request as ready for review Sep 21, 2020
@codecov
Copy link

codecov bot commented Sep 22, 2020

Codecov Report

Merging #4804 into master will increase coverage by 0.27%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4804      +/-   ##
==========================================
+ Coverage   87.54%   87.81%   +0.27%     
==========================================
  Files         160      160              
  Lines        9761     9749      -12     
  Branches     1440     1439       -1     
==========================================
+ Hits         8545     8561      +16     
+ Misses        954      926      -28     
  Partials      262      262              
Impacted Files Coverage Δ
scrapy/utils/test.py 60.93% <ø> (+4.35%) ⬆️
scrapy/pipelines/files.py 71.67% <0.00%> (+6.99%) ⬆️

wRAR
wRAR approved these changes Oct 6, 2020
Copy link
Contributor

@wRAR wRAR left a comment

Cool!

@wRAR wRAR merged commit 1aeda66 into scrapy:master Oct 6, 2020
1 check passed
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 all S3 tests on travis
2 participants