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

iplweb / bpp / 79f9159b-fc2b-4fb0-a03d-b2c486c11307

18 Aug 2025 07:01PM UTC coverage: 39.761% (-5.8%) from 45.554%
79f9159b-fc2b-4fb0-a03d-b2c486c11307

push

circleci

mpasternak
Merge branch 'release/v202508.1190'

15 of 56 new or added lines in 7 files covered. (26.79%)

1686 existing lines in 105 files now uncovered.

15161 of 38130 relevant lines covered (39.76%)

0.4 hits per line

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

16.67
src/pbn_api/tests/test_utils.py
1
from pbn_api.utils import rename_dict_key
1✔
2

3

4
def test_rename_dict_key_simple():
1✔
NEW
5
    d = {"mniswId": 123}
×
NEW
6
    res = rename_dict_key(d, "mniswId", "ministryId")
×
7

NEW
8
    assert "mniswId" in d
×
NEW
9
    assert "ministryId" not in d
×
10

NEW
11
    assert "ministryId" in res
×
NEW
12
    assert "mniswId" not in res
×
13

14

15
def test_rename_dict_key_nested():
1✔
NEW
16
    d = {"test": {"mniswId": 123}}
×
NEW
17
    res = rename_dict_key(d, "mniswId", "ministryId")
×
18

NEW
19
    assert "mniswId" in d["test"]
×
NEW
20
    assert "ministryId" not in d["test"]
×
21

NEW
22
    assert "ministryId" in res["test"]
×
NEW
23
    assert "mniswId" not in res["test"]
×
24

25

26
def test_rename_dict_key_nested_in_list():
1✔
NEW
27
    d = [{"test": [{"mniswId": 123}]}]
×
NEW
28
    res = rename_dict_key(d, "mniswId", "ministryId")
×
29

NEW
30
    assert "mniswId" in d[0]["test"][0]
×
NEW
31
    assert "ministryId" not in d[0]["test"][0]
×
32

NEW
33
    assert "ministryId" in res[0]["test"][0]
×
NEW
34
    assert "mniswId" not in res[0]["test"][0]
×
35

36

37
def test_rename_dict_key_real():
1✔
NEW
38
    d = {
×
39
        "editors": [{"givenNames": "Ma\u0142gorzata Anna", "lastName": "Test"}],
40
        "isbn": "9788367881944",
41
        "mainLanguage": "pol",
42
        "publicUri": "https://test",
43
        "publicationPlace": "Lublin",
44
        "publisher": {
45
            "mniswId": 85900,
46
            "name": "Wydawnictwo Naukowe TYGIEL Sp. z o. o.",
47
            "objectId": "21234",
48
        },
49
        "title": "Test",
50
        "translation": False,
51
        "type": "EDITED_BOOK",
52
        "year": 2025,
53
    }
54

NEW
55
    res = rename_dict_key(d, "mniswId", "ministryId")
×
56

NEW
57
    assert "mniswId" in d["publisher"]
×
NEW
58
    assert "ministryId" not in d["publisher"]
×
59

NEW
60
    assert "ministryId" in res["publisher"]
×
NEW
61
    assert "mniswId" not in res["publisher"]
×
62

63

64
def test_rename_dict_key_real_list():
1✔
NEW
65
    d = [
×
66
        {
67
            "editors": [{"givenNames": "Ma\u0142gorzata Anna", "lastName": "Test"}],
68
            "isbn": "Test",
69
            "mainLanguage": "pol",
70
            "publicUri": "Test",
71
            "publicationPlace": "Lublin",
72
            "publisher": [
73
                {
74
                    "mniswId": 85900,
75
                    "name": "Wydawnictwo Naukowe TYGIEL Sp. z o. o.",
76
                    "objectId": "Test",
77
                }
78
            ],
79
            "title": "Test",
80
            "translation": False,
81
            "type": "EDITED_BOOK",
82
            "year": 2025,
83
        }
84
    ]
85

NEW
86
    res = rename_dict_key(d, "mniswId", "ministryId")
×
87

NEW
88
    assert "mniswId" in d[0]["publisher"][0]
×
NEW
89
    assert "ministryId" not in d[0]["publisher"][0]
×
90

NEW
91
    assert "ministryId" in res[0]["publisher"][0]
×
NEW
92
    assert "mniswId" not in res[0]["publisher"][0]
×
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