Beispiel #1
0
def contact_from_user(user):
    contact = Contact()
    contact.first_name = user.first_name
    contact.last_name = user.last_name
    contact.email = user.email
    contact.save()
    return contact
Beispiel #2
0
 def setUp(self):
     contact = Contact()
     contact.first_name = "Jeffery"
     contact.last_name = "Smith"
     contact.email = "*****@*****.**"
     contact.save()
     category = Category(name='Device')
     category.save()
     for category in self.categories:
         Category(name=category).save()
Beispiel #3
0
 def setUp(self):
     self.user.email = lambda: None
     setattr(self.user, 'email',
             '*****@*****.**')
     contact = Contact(email='*****@*****.**')
     contact.save()
     category = Category(name='Devices')
     category.save()
     for key in self.form_values.keys():
         category = Category(name=key)
         category.save()