Skip to content

Commit

Permalink
ensure test are green without internet connection (#943)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyNikiforov committed Sep 1, 2024
1 parent 5d417e0 commit 71f42ce
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test = [
"pytest==7.4.3",
"mock==5.1.0",
"freezegun==1.5.1",
"vcrpy==4.4.0",
"vcrpy==6.0.1",
"pytest-cov==4.1.0",
"ruff==0.5.0",
"coveralls==3.3.1",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from tests.helpers import path_from_project_root, recreate_path

vcr = VCR(decode_compressed_response=True)
vcr = VCR(decode_compressed_response=True, record_mode="none")


class AuthenticationTestCase(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_autodelete_photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from tests.helpers import path_from_project_root, print_result_exception, recreate_path

vcr = VCR(decode_compressed_response=True, record_mode="new_episodes")
vcr = VCR(decode_compressed_response=True, record_mode="none")


class AutodeletePhotosTestCase(TestCase):
Expand Down Expand Up @@ -68,6 +68,7 @@ def astimezone(self, _tz: (Optional[Any]) = None) -> NoReturn:
cookie_dir,
],
)
print_result_exception(result)

self.assertIn(
"DEBUG Looking up all photos and videos from album All Photos...",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from tests.helpers import path_from_project_root, print_result_exception, recreate_path

vcr = VCR(decode_compressed_response=True)
vcr = VCR(decode_compressed_response=True, record_mode="none")


class CliTestCase(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_download_live_photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
run_icloudpd_test,
)

vcr = VCR(decode_compressed_response=True)
vcr = VCR(decode_compressed_response=True, record_mode="none")


class DownloadLivePhotoTestCase(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_download_live_photos_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
run_icloudpd_test,
)

vcr = VCR(decode_compressed_response=True)
vcr = VCR(decode_compressed_response=True, record_mode="none")


class DownloadLivePhotoNameIDTestCase(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_download_photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
run_icloudpd_test,
)

vcr = VCR(decode_compressed_response=True)
vcr = VCR(decode_compressed_response=True, record_mode="none")


class DownloadPhotoTestCase(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_download_photos_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
run_icloudpd_test,
)

vcr = VCR(decode_compressed_response=True)
vcr = VCR(decode_compressed_response=True, record_mode="none")


class DownloadPhotoNameIDTestCase(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_email_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from tests.helpers import path_from_project_root, recreate_path

vcr = VCR(decode_compressed_response=True)
vcr = VCR(decode_compressed_response=True, record_mode="none")


class EmailNotificationsTestCase(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_folder_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
run_icloudpd_test,
)

vcr = VCR(decode_compressed_response=True)
vcr = VCR(decode_compressed_response=True, record_mode="none")


class FolderStructureTestCase(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_listing_albums.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from tests.helpers import path_from_project_root, print_result_exception, recreate_path

vcr = VCR(decode_compressed_response=True)
vcr = VCR(decode_compressed_response=True, record_mode="none")


class ListingAlbumsTestCase(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_listing_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from tests.helpers import path_from_project_root, print_result_exception, recreate_path

vcr = VCR(decode_compressed_response=True)
vcr = VCR(decode_compressed_response=True, record_mode="none")


class ListingLibraryTestCase(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_listing_recent_photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from tests.helpers import path_from_project_root, print_result_exception, recreate_path

vcr = VCR(decode_compressed_response=True)
vcr = VCR(decode_compressed_response=True, record_mode="none")


class ListingRecentPhotosTestCase(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_two_step_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from tests.helpers import path_from_project_root, recreate_path

vcr = VCR(decode_compressed_response=True)
vcr = VCR(decode_compressed_response=True, record_mode="none")


class TwoStepAuthTestCase(TestCase):
Expand Down

0 comments on commit 71f42ce

Please sign in to comment.