• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

localstack / localstack / 65ebfa7b-38ab-49bb-b71e-44800576a11c

14 Mar 2025 12:37AM UTC coverage: 86.954% (+0.02%) from 86.93%
65ebfa7b-38ab-49bb-b71e-44800576a11c

push

circleci

web-flow
Fix apigw input path formatting (#12379)

43 of 49 new or added lines in 2 files covered. (87.76%)

103 existing lines in 16 files now uncovered.

62313 of 71662 relevant lines covered (86.95%)

0.87 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.82
/localstack-core/localstack/utils/urls.py
1
from typing import Optional
1✔
2

3
from localstack import config
1✔
4
from localstack.config import HostAndPort
1✔
5

6

7
def path_from_url(url: str) -> str:
1✔
8
    return f"/{url.partition('://')[2].partition('/')[2]}" if "://" in url else url
×
9

10

11
def hostname_from_url(url: str) -> str:
1✔
UNCOV
12
    return url.split("://")[-1].split("/")[0].split(":")[0]
×
13

14

15
def localstack_host(custom_port: Optional[int] = None) -> HostAndPort:
1✔
16
    """
17
    Determine the host and port to return to the user based on:
18
    - the user's configuration (e.g environment variable overrides)
19
    - the defaults of the system
20
    """
21
    port = custom_port or config.LOCALSTACK_HOST.port
1✔
22
    host = config.LOCALSTACK_HOST.host
1✔
23
    return HostAndPort(host=host, port=port)
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc