Beispiel #1
0
 def test_name(self) -> None:
     self.assertIsInstance(Retirement.name(), str)
     self.assertNotEqual('', Retirement.name())
Beispiel #2
0
 def test_label(self) -> None:
     with Translations(NullTranslations()):
         sut = Retirement()
         self.assertIsInstance(sut.label, str)
         self.assertNotEqual('', sut.label)
Beispiel #3
0
    'Adopted': Adoption(),
    'Cremation': Cremation(),
    'Death': Death(),
    'Funeral': Funeral(),
    'Burial': Burial(),
    'Will': Will(),
    'Engagement': Engagement(),
    'Marriage': Marriage(),
    'Marriage Banns': MarriageAnnouncement(),
    'Divorce': Divorce(),
    'Divorce Filing': DivorceAnnouncement(),
    'Residence': Residence(),
    'Immigration': Immigration(),
    'Emigration': Emigration(),
    'Occupation': Occupation(),
    'Retirement': Retirement(),
    'Correspondence': Correspondence(),
    'Confirmation': Confirmation(),
    'Missing': Missing(),
}


def _load_event(loader: _Loader, element: ElementTree.Element):
    handle = element.get('handle')
    event_id = element.get('id')
    gramps_type = _xpath1(element, './ns:type')

    try:
        event_type = _EVENT_TYPE_MAP[gramps_type.text]
    except KeyError:
        event_type = UnknownEventType()