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

box / box-python-sdk / 7583613459

19 Jan 2024 12:14PM UTC coverage: 93.536% (+0.005%) from 93.531%
7583613459

push

github

web-flow
fix: Update exception file get download URL (#866)

* fix: Update exception file get download URL

* fix: Update exception file get download URL

3 of 3 new or added lines in 1 file covered. (100.0%)

3473 of 3713 relevant lines covered (93.54%)

1.87 hits per line

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

80.0
/boxsdk/util/json.py
1
from typing import TYPE_CHECKING, Union
2✔
2

3
if TYPE_CHECKING:
2✔
4
    from boxsdk.session.box_response import BoxResponse
×
5
    from boxsdk import NetworkResponse
×
6

7

8
def is_json_response(network_response: Union['BoxResponse', 'NetworkResponse']) -> bool:
2✔
9
    """Return whether or not the network response content is json.
10

11
    :param network_response:
12
        The response from the Box API.
13
    """
14
    try:
2✔
15
        network_response.json()
2✔
16
        return True
2✔
17
    except ValueError:
2✔
18
        return False
2✔
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