def test_str(self): contact = Contact(speaker=self.speaker, kind='E', value='*****@*****.**') self.assertEqual('*****@*****.**', str(contact))
def test_choice(self): """Contact kind should be limited to E or P""" contact = Contact(speaker=self.speaker, kind='A', value='B') self.assertRaises(ValidationError, contact.full_clean)
def test_str(self): contact = Contact(speaker=self.speaker, kind=Contact.EMAIL, value='*****@*****.**') self.assertEqual('*****@*****.**', str(contact))
def test_unicode(self): 'Testa o unicode ' contact = Contact(speaker=self.speaker, kind='E', value='*****@*****.**') self.assertEqual('*****@*****.**', unicode(contact))
def test_unicode(self): 'Contact String representation should be value.' contact = Contact(speaker=self.speaker, kind='E', value='*****@*****.**') self.assertEqual('*****@*****.**', unicode(contact))
def test_choices(self): """Tipo de contato deve ser limitado a E ou P""" contact = Contact(speaker=self.speaker, kind='A', value='B') self.assertRaises(ValidationError, contact.full_clean)
def test_kind(self): """ Contact kind should be limited to P, F or E """ contact = Contact(speaker=self.speaker, kind='A', value='21-98170-0339') self.assertRaises(ValidationError, contact.full_clean)
def test_unicode(self): """ Contact string representation should be unicode. """ contact = Contact(speaker=self.speaker, kind='E', value='*****@*****.**') self.assertEquals(u'*****@*****.**', unicode(contact))
def test_str(self): contact = Contact(speaker=self.speaker, kind=Contact.EMAIL, value='*****@*****.**') self.assertEquals('*****@*****.**', str(contact))
def test_choiches(self): contact = Contact(speaker=self.speaker, kind='A', value='B') self.assertRaises(ValidationError, contact.full_clean)
def test_unicode(self): 'Contact string representation sould be value.' contact = Contact(speaker=self.speaker, kind='E', value='*****@*****.**') self.assertEqual(u'*****@*****.**', unicode(contact))
def test_unicode(self): 'Contact string representation should be value' contact = Contact(speaker=self.speaker, kind='E', value='*****@*****.**') self.assertEqual(u'*****@*****.**', unicode(contact))
def test_kind(self): 'Kind must be E, P or F.' contact = Contact(speaker=self.speaker, kind='J', value='B') self.assertRaises(ValidationError, contact.full_clean)
def test_choices(self): """ Contact should be limited to phone or email """ contact = Contact(speaker=self.speaker, kind='A', value='test') self.assertRaises(ValidationError, contact.full_clean)
def test_kind(self): 'Tipo contato deve estar limitado a E, P ou F' contact = Contact(speaker=self.speaker, kind='A', value='B') self.assertRaises(ValidationError, contact.full_clean)
def test_unicode(self): 'Contact string representation should be value.' contact = Contact(speaker=self.speaker, kind='E', value='*****@*****.**') self.assertEqual(u'*****@*****.**', unicode(contact))
def test_kind(self): 'Contact king should be limited to E, P or F.' contact = Contact(speaker=self.speaker, kind='A', value='B') self.assertRaises(ValidationError, contact.full_clean)
def test_str(self): contact = Contact(speaker=self.speaker, kind=Contact.PHONE, value="21-999999999") self.assertEqual("21-999999999", str(contact))