def test_unmarshall_not_obfuscated(self): # Data is not obfuccated if the user is authenticated. marshaller = TextFieldMarshaller(None, WebServiceTestRequest()) with person_logged_in(self.factory.makePerson()): result = marshaller.unmarshall(None, u"*****@*****.**") self.assertEqual(u"*****@*****.**", result)
def test_unmarshall_obfuscated(self): # Data is obfuscated if the user is anonynous. marshaller = TextFieldMarshaller(None, WebServiceTestRequest()) result = marshaller.unmarshall(None, u"*****@*****.**") self.assertEqual(u"<email address hidden>", result)