push
circleci
167 of 327 new or added lines in 47 files covered. (51.07%)
9871 existing lines in 333 files now uncovered.17929 of 34014 relevant lines covered (52.71%)
2.02 hits per line
1 |
class WydawnictwoNadrzednePBNAdapter: |
5✔ |
2 |
def __init__(self, original): |
5✔ |
UNCOV
3
|
self.original = original
|
× |
4 |
|
|
5 |
def pbn_get_json(self): |
5✔ |
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
|
× |