def test_anniversary_supports_setting_text_values_for_v4(self): vcard = vCard(version="4.0") wrapper = VCardWrapper(vcard, "4.0") date = 'some time yesterday' wrapper.anniversary = date wrapper.vcard.validate() self.assertEqual(wrapper.anniversary, date)
def test_anniversary_supports_setting_datetime_objects(self): vcard = create_test_vcard() wrapper = VCardWrapper(vcard) date = datetime.datetime(2018, 2, 1, 19, 29, 31) wrapper.anniversary = date wrapper.vcard.validate() self.assertEqual(wrapper.anniversary, date)