def test_get_first_name_last_name_with_complex_name(self): vcard = create_test_vcard() wrapper = VCardWrapper(vcard) wrapper._add_name(['prefix1', 'prefix2'], ['given1', 'given2'], ['additional1', 'additional2'], ['family1', 'family2'], ['suffix1', 'suffix2']) self.assertEqual( wrapper.get_first_name_last_name(), 'given1 given2 ' 'additional1 additional2 family1 family2')
def test_get_first_name_last_name_with_simple_name(self): vcard = create_test_vcard() wrapper = VCardWrapper(vcard) wrapper._add_name('', 'given', '', 'family', '') self.assertEqual(wrapper.get_first_name_last_name(), "given family")
def test_get_first_name_last_name_with_all_name_fields(self): vcard = create_test_vcard() wrapper = VCardWrapper(vcard) wrapper._add_name('prefix', 'given', 'additional', 'family', 'suffix') self.assertEqual(wrapper.get_first_name_last_name(), 'given additional family')
def test_get_first_name_last_name_retunrs_fn_if_no_name_present(self): vcard = create_test_vcard() wrapper = VCardWrapper(vcard) self.assertEqual(wrapper.get_first_name_last_name(), 'Test vCard')