Esempio n. 1
0
class SignupView(TestCase):
    def setUp(self):
        self.c = Client()
        self.uri = '/signup'

        self.industry = Industry(title='aewfioj', code=12)
        self.industry.save()

        self.email = '*****@*****.**'
        self.user = {
            'name': 'aeawef',
            'email': self.email,
            'password': '******',
            'birthday': '1989-02-16',
            'gender': 0,
            'category': 0,
            'industry': industry.id
        }
        self.vet = {
            'rank': 'awef',
            'service_location': 'awoefij',
            'service_start_date': '1234-12-31',
            'education': 0
        }

    def test_create_profile(self):
        response = self.c.post(self.uri, self.user)
        self.assertTemplateUsed(response, 'create_vet_profile.html')

        # the user should be created
        User.objects.get(email=self.email)
Esempio n. 2
0
    def setUp(self):
        self.c = Client()
        self.uri = '/signup'

        self.industry = Industry(title='aewfioj', code=12)
        self.industry.save()

        self.email = '*****@*****.**'
        self.user = {
            'name': 'aeawef',
            'email': self.email,
            'password': '******',
            'birthday': '1989-02-16',
            'gender': 0,
            'category': 0,
            'industry': industry.id
        }
        self.vet = {
            'rank': 'awef',
            'service_location': 'awoefij',
            'service_start_date': '1234-12-31',
            'education': 0
        }