push
circleci
1 of 1 new or added line in 1 file covered. (100.0%)
4222 existing lines in 213 files now uncovered.16665 of 34028 relevant lines covered (48.97%)
1.25 hits per line
1 |
import json |
3✔ |
2 |
|
|
3 |
from django.utils.safestring import mark_safe |
3✔ |
4 |
|
|
5 |
|
|
6 |
def format_json(obj, fld_name): |
3✔ |
UNCOV
7
|
result = ""
|
1✔ |
UNCOV
8
|
if obj:
|
1✔ |
UNCOV
9
|
result = json.dumps(getattr(obj, fld_name), indent=4, sort_keys=True) |
1✔ |
UNCOV
10
|
result_str = f"<pre>{result}</pre>"
|
1✔ |
UNCOV
11
|
result = mark_safe(result_str) |
1✔ |
UNCOV
12
|
return result
|
1✔ |