Skip to content

Commit

Permalink
Align vcrpy usage with VCRTestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckwondo committed Apr 9, 2024
1 parent 9669377 commit fae6b73
Show file tree
Hide file tree
Showing 11 changed files with 553 additions and 102 deletions.
4 changes: 2 additions & 2 deletions earthaccess/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

import dateutil.parser as parser
import requests

from cmr import CollectionQuery, GranuleQuery

from .auth import Auth
from .daac import find_provider, find_provider_by_shortname
from .results import DataCollection, DataGranule
from .typing_ import (
Any,
Dict,
List,
Never,
Optional,
Expand Down Expand Up @@ -54,7 +54,7 @@ def get_results(
while more_results:
response = requests.get(url, headers=headers, params={"page_size": page_size})

if cmr_search_after := query.headers.get("cmr-search-after"):
if cmr_search_after := response.headers.get("cmr-search-after"):
headers["cmr-search-after"] = cmr_search_after

try:
Expand Down
17 changes: 14 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ module = [
"pqdm.*",
"s3fs",
"tinynetrc.*", # TODO: generate stubs for tinynetrc and remove this line
"vcr.unittest", # TODO: generate stubs for vcr and remove this line
]
ignore_missing_imports = true

Expand Down
File renamed without changes.
Loading

0 comments on commit fae6b73

Please sign in to comment.