-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add debugging for unknown itemtype (#986)
- Loading branch information
1 parent
4a2b3cc
commit 9d74b24
Showing
4 changed files
with
44,818 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1000,7 +1000,7 @@ def astimezone(self, _tz: (Optional[Any]) = None) -> NoReturn: | |
self.assertIn("INFO All photos have been downloaded", self._caplog.text) | ||
assert result.exit_code == 0 | ||
|
||
def test_unknown_item_type(self) -> None: | ||
def test_missing_item_type(self) -> None: | ||
base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) | ||
|
||
with mock.patch("icloudpd.download.download_media") as dp_patched: | ||
|
@@ -1030,6 +1030,36 @@ def test_unknown_item_type(self) -> None: | |
|
||
self.assertIsInstance(result.exception, ValueError) | ||
|
||
def test_missing_item_type_value(self) -> None: | ||
base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) | ||
|
||
with mock.patch("icloudpd.download.download_media") as dp_patched: | ||
dp_patched.return_value = True | ||
|
||
data_dir, result = run_icloudpd_test( | ||
self.assertEqual, | ||
self.root_path, | ||
base_dir, | ||
"listing_photos_missing_item_type_value.yml", | ||
[], | ||
[], | ||
[ | ||
"--username", | ||
"[email protected]", | ||
"--password", | ||
"password1", | ||
"--recent", | ||
"1", | ||
"--no-progress-bar", | ||
"--threads-num", | ||
"1", | ||
], | ||
) | ||
|
||
dp_patched.assert_not_called() | ||
|
||
self.assertIsInstance(result.exception, ValueError) | ||
|
||
def test_download_and_dedupe_existing_photos(self) -> None: | ||
base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -949,7 +949,7 @@ def astimezone(self, _tz: (Optional[Any]) = None) -> NoReturn: | |
self.assertIn("INFO All photos have been downloaded", self._caplog.text) | ||
assert result.exit_code == 0 | ||
|
||
def test_unknown_item_type_name_id7(self) -> None: | ||
def test_missing_item_type_name_id7(self) -> None: | ||
base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) | ||
|
||
with mock.patch("icloudpd.download.download_media") as dp_patched: | ||
|
@@ -979,6 +979,36 @@ def test_unknown_item_type_name_id7(self) -> None: | |
|
||
self.assertIsInstance(result.exception, ValueError) | ||
|
||
def test_missing_item_type_value_name_id7(self) -> None: | ||
base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) | ||
|
||
with mock.patch("icloudpd.download.download_media") as dp_patched: | ||
dp_patched.return_value = True | ||
|
||
data_dir, result = run_icloudpd_test( | ||
self.assertEqual, | ||
self.root_path, | ||
base_dir, | ||
"listing_photos_missing_item_type_value.yml", | ||
[], | ||
[], | ||
[ | ||
"--username", | ||
"[email protected]", | ||
"--password", | ||
"password1", | ||
"--recent", | ||
"1", | ||
"--no-progress-bar", | ||
"--file-match-policy", | ||
"name-id7", | ||
], | ||
) | ||
|
||
dp_patched.assert_not_called() | ||
|
||
self.assertIsInstance(result.exception, ValueError) | ||
|
||
def test_download_and_dedupe_existing_photos_name_id7(self) -> None: | ||
base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) | ||
|
||
|
Oops, something went wrong.