Coverage for portality/api/current/data_objects/common_journal_application.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v6.4.2, created at 2022-07-22 15:59 +0100

1from copy import deepcopy 

2 

3from portality.lib import swagger 

4from portality.lib.seamless import SeamlessMixin 

5 

6from portality.models.v2.shared_structs import JOURNAL_BIBJSON 

7_SHARED_STRUCT = JOURNAL_BIBJSON 

8 

9class OutgoingCommonJournalApplication(SeamlessMixin, swagger.SwaggerSupport): 

10 """ 

11 ~~APIOutgoingCommonJournalApplication:Model->Seamless:Library~~ 

12 """ 

13 @classmethod 

14 def from_model(cls, journal_or_app): 

15 d = deepcopy(journal_or_app.data) 

16 return cls(d)