-
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate ExtractResult from namedtuple to dataclass (#306)
- Loading branch information
1 parent
4067dea
commit e739ff8
Showing
5 changed files
with
27 additions
and
70 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
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 |
---|---|---|
|
@@ -412,20 +412,6 @@ def test_ipv4_lookalike() -> None: | |
) | ||
|
||
|
||
def test_result_as_dict() -> None: | ||
"""Test that the result is a namedtuple.""" | ||
result = extract( | ||
"http://admin:[email protected]:666/secret/admin/interface?param1=42" | ||
) | ||
expected_dict = { | ||
"subdomain": "www", | ||
"domain": "google", | ||
"suffix": "com", | ||
"is_private": False, | ||
} | ||
assert result._asdict() == expected_dict | ||
|
||
|
||
def test_cache_permission( | ||
mocker: pytest_mock.MockerFixture, monkeypatch: pytest.MonkeyPatch, tmp_path: Path | ||
) -> None: | ||
|
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