예제 #1
0
파일: tests.py 프로젝트: johan718/vetmentor
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)
예제 #2
0
파일: tests.py 프로젝트: johan718/vetmentor
    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
        }