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

safe-global / safe-eth-py / 10629626286

30 Aug 2024 08:42AM UTC coverage: 93.903% (+0.01%) from 93.892%
10629626286

push

github

web-flow
Move cowswap folder (#1307)

5 of 5 new or added lines in 3 files covered. (100.0%)

8671 of 9234 relevant lines covered (93.9%)

3.76 hits per line

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

76.92
/safe_eth/eth/django/validators.py
1
from django.core.exceptions import ValidationError
4✔
2

3
from hexbytes import HexBytes
4✔
4

5
from ..utils import fast_is_checksum_address
4✔
6

7

8
def validate_address(address: str):
4✔
9
    try:
4✔
10
        address_bytes = HexBytes(address)
4✔
11
        if len(address_bytes) != 20:
4✔
12
            raise ValueError
×
13
    except ValueError:
×
14
        raise ValidationError(
×
15
            "%(address)s is not a valid EthereumAddress",
16
            params={"address": address},
17
        )
18

19

20
def validate_checksumed_address(address: str):
4✔
21
    if not fast_is_checksum_address(address):
4✔
22
        raise ValidationError(
4✔
23
            "%(address)s has an invalid checksum",
24
            params={"address": address},
25
        )
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

© 2025 Coveralls, Inc