push
circleci
29 of 45 new or added lines in 16 files covered. (64.44%)
9915 existing lines in 334 files now uncovered.17961 of 33954 relevant lines covered (52.9%)
2.39 hits per line
1 |
class WydawnictwoNadrzednePBNAdapter: |
6✔ |
2 |
def __init__(self, original): |
6✔ |
UNCOV
3
|
self.original = original
|
× |
4 |
|
|
5 |
def pbn_get_json(self): |
6✔ |
UNCOV
6
|
if self.original.pbn_uid_id is not None: |
× |
7 |
return {"objectId": self.original.pbn_uid_id} |
× |
8 |
|
|
UNCOV
9
|
ret = {} |
× |
10 |
|
|
UNCOV
11
|
for attr in "isbn", "issn", "title", "year": |
× |
UNCOV
12
|
if hasattr(self.original, attr): |
× |
UNCOV
13
|
v = getattr(self.original, attr) |
× |
UNCOV
14
|
if v is not None: |
× |
15 |
ret[attr] = v |
× |
16 |
|
|
UNCOV
17
|
ret["title"] = self.original.tytul_oryginalny |
× |
UNCOV
18
|
ret["year"] = self.original.rok |
× |
19 |
|
|
UNCOV
20
|
from pbn_api.adapters.wydawnictwo import WydawnictwoPBNAdapter |
× |
21 |
|
|
UNCOV
22
|
volume = WydawnictwoPBNAdapter(self.original).nr_tomu()
|
× |
UNCOV
23
|
if volume:
|
× |
24 |
ret["volume"] = volume
|
× |
25 |
|
|
UNCOV
26
|
translation = WydawnictwoPBNAdapter(self.original).get_translation()
|
× |
UNCOV
27
|
ret["translation"] = translation
|
× |
28 |
|
|
UNCOV
29
|
return ret
|
× |