Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/d/j/django-starter-box-0.1.0/djaccount/tests/models.py   django-starter-box(Download)
    def setUp(self):
        self.acc        = Account.objects.create_user(email=self.EMAIL, first_name=self.FIRST_NAME, password=self.PASSWORD)
        self.factory    = RequestFactory()
 
    def test_case_sensitive_email(self):
    def test_create_user_dup(self):
        with self.assertRaises(AccountEmailTakenError):
            Account.objects.create_user(email=self.acc.email, first_name=self.FIRST_NAME, password=self.PASSWORD)
 
    def test_change_email(self):
        acc.save()
 
        acc2 = Account.objects.create_user(email=self.EMAIL_2, first_name=self.FIRST_NAME, password=self.PASSWORD)
 
        with self.assertRaises(AccountEmailTakenError):
 
        acc     = self.acc
        acc2    = Account.objects.create_user(email=self.EMAIL_2, first_name=self.FIRST_NAME, password=self.PASSWORD)
 
        ext = Account.objects.fb_link(account=acc, cookies=cookies, app_id=app_id, app_secret=app_secret)

src/d/j/django-starter-box-HEAD/djaccount/tests/models.py   django-starter-box(Download)
    def setUp(self):
        self.acc        = Account.objects.create_user(email=self.EMAIL, first_name=self.FIRST_NAME, password=self.PASSWORD)
        self.factory    = RequestFactory()
 
    def test_case_sensitive_email(self):
    def test_create_user_dup(self):
        with self.assertRaises(AccountEmailTakenError):
            Account.objects.create_user(email=self.acc.email, first_name=self.FIRST_NAME, password=self.PASSWORD)
 
    def test_change_email(self):
        acc.save()
 
        acc2 = Account.objects.create_user(email=self.EMAIL_2, first_name=self.FIRST_NAME, password=self.PASSWORD)
 
        with self.assertRaises(AccountEmailTakenError):
 
        acc     = self.acc
        acc2    = Account.objects.create_user(email=self.EMAIL_2, first_name=self.FIRST_NAME, password=self.PASSWORD)
 
        ext = Account.objects.fb_link(account=acc, cookies=cookies, app_id=app_id, app_secret=app_secret)