Skip to content

Commit

Permalink
Version 5.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lk-geimfari committed Aug 6, 2022
1 parent a1d754a commit 529228a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
Version 5.6.1
-------------

**Fixed**:

- Fixed ``ValidationFailure`` for ``Internet().uri()``.

**Removed**:

- Removed support of ``port`` parameter in ``Internet().uri()``.

Version 5.6.0

**Added**:
Expand Down
2 changes: 1 addition & 1 deletion mimesis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"__license__",
]

__version__ = "5.6.0"
__version__ = "5.6.1"
__title__ = "mimesis"
__description__ = "Mimesis: fake data generator."
__url__ = "https://github.com/lk-geimfari/mimesis"
Expand Down
2 changes: 1 addition & 1 deletion mimesis/data/int/person.py
Original file line number Diff line number Diff line change
Expand Up @@ -2863,7 +2863,7 @@
"employ",
"employed",
"employee",
"employees_db",
"employees",
"employer",
"employers",
"employment",
Expand Down
4 changes: 1 addition & 3 deletions mimesis/providers/internet.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,15 +272,13 @@ def url(
def uri(
self,
scheme: t.Optional[URLScheme] = URLScheme.HTTPS,
port_range: t.Optional[PortRange] = None,
tld_type: t.Optional[TLDType] = None,
subdomains: t.Optional[t.List[str]] = None,
query_params_count: t.Optional[int] = None,
) -> str:
"""Generate a random URI.
:param scheme: Scheme.
:param port_range: PortRange enum object.
:param tld_type: TLDType.
:param subdomains: List of subdomains (make sure they are valid).
:param query_params_count: Query params.
Expand All @@ -291,7 +289,7 @@ def uri(
.strftime("%Y-%m-%d")
.replace("-", "/")
)
url = self.url(scheme, port_range, tld_type, subdomains)
url = self.url(scheme, None, tld_type, subdomains)
uri = f"{url}{directory}/{self.slug()}"

if query_params_count:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mimesis"
version = "5.6.0"
version = "5.6.1"
description = "Mimesis: Fake Data Generator."
authors = ["Isaak Uchakaev <[email protected]>"]
license = "MIT"
Expand Down
6 changes: 2 additions & 4 deletions tests/test_providers/test_internet.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,21 @@ def test_default(self, net):

@pytest.mark.repeat(10)
@pytest.mark.parametrize(
"scheme, port_range, tld_type, subdomains, query_params_count",
"scheme, tld_type, subdomains, query_params_count",
[
(
URLScheme.HTTPS,
PortRange.WELL_KNOWN,
TLDType.GTLD,
["core", "app", "test", "dev"],
5,
),
],
)
def test_uri_with_parameters(
self, net, scheme, port_range, tld_type, subdomains, query_params_count
self, net, scheme, tld_type, subdomains, query_params_count
):
uri = net.uri(
scheme=scheme,
port_range=port_range,
tld_type=tld_type,
subdomains=subdomains,
query_params_count=query_params_count,
Expand Down

0 comments on commit 529228a

Please sign in to comment.