Exemplo n.º 1
0
 def test_set_birth_date(self):
     member = self.portal.portal_membership.getAuthenticatedMember()
     member.setMemberProperties({'birth_date': '20.01.1990'})
     self.assertEqual(member.getProperty('birth_date'), '20.01.1990')
     instance = UserDataPanelAdapter(self.portal)
     instance.set_birth_date()
     self.assertEqual(member.getProperty('birth_date'), '')
Exemplo n.º 2
0
 def test_set_birth_date(self):
     member = self.portal.portal_membership.getAuthenticatedMember()
     member.setMemberProperties({'birth_date': '20.01.1990'})
     self.assertEqual(member.getProperty('birth_date'), '20.01.1990')
     instance = UserDataPanelAdapter(self.portal)
     instance.set_birth_date()
     self.assertEqual(member.getProperty('birth_date'), '')
Exemplo n.º 3
0
 def test_set_registration_number(self):
     instance = UserDataPanelAdapter(self.portal)
     instance.set_registration_number(None)
     self.assertEqual(instance.context.registration_number, '')
Exemplo n.º 4
0
 def test_set_allow_direct_marketing(self):
     instance = UserDataPanelAdapter(self.portal)
     instance.set_allow_direct_marketing(None)
     self.assertFalse(instance.context.allow_direct_marketing)
Exemplo n.º 5
0
 def test_set_registration_number(self):
     instance = UserDataPanelAdapter(self.portal)
     instance.set_registration_number(None)
     self.assertEqual(instance.context.registration_number, '')
Exemplo n.º 6
0
 def test_set_allow_direct_marketing(self):
     instance = UserDataPanelAdapter(self.portal)
     instance.set_allow_direct_marketing(None)
     self.assertFalse(instance.context.allow_direct_marketing)