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

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

src/d/j/django-starter-box-0.1.0/djaccount/tests/models.py   django-starter-box(Download)
    def test_case_sensitive_email(self):
        try:
            acc2 = Account.objects.get(email=_unnormalize(self.acc.email))
        except Account.DoesNotExist:
            print 'WARNING: Database email column is case sensitive'
        self.assertEqual(acc.email, Account.objects.normalize_email(self.EMAIL_2))
 
        acc = Account.objects.get(pk=acc.pk)
        self.assertFalse(acc.is_active)
        self.assertEqual(acc.email, Account.objects.normalize_email(self.EMAIL_2))            
        self.assertEqual(acc.email, self.EMAIL)
 
        acc = Account.objects.get(pk=acc.pk)
        self.assertTrue(acc.is_active)
        self.assertEqual(acc.email, self.EMAIL)
        self.assertFalse(acc.is_active)
 
        acc = Account.objects.get(pk=acc.pk)
        self.assertFalse(acc.is_active)
 
        res = Account.objects.do_verify(account=acc, code=code)
        self.assertTrue(res)
        self.assertTrue(acc.is_active)
 
        acc = Account.objects.get(pk=acc.pk)

src/d/j/django-starter-box-HEAD/djaccount/tests/models.py   django-starter-box(Download)
    def test_case_sensitive_email(self):
        try:
            acc2 = Account.objects.get(email=_unnormalize(self.acc.email))
        except Account.DoesNotExist:
            print 'WARNING: Database email column is case sensitive'
        self.assertEqual(acc.email, Account.objects.normalize_email(self.EMAIL_2))
 
        acc = Account.objects.get(pk=acc.pk)
        self.assertFalse(acc.is_active)
        self.assertEqual(acc.email, Account.objects.normalize_email(self.EMAIL_2))            
        self.assertEqual(acc.email, self.EMAIL)
 
        acc = Account.objects.get(pk=acc.pk)
        self.assertTrue(acc.is_active)
        self.assertEqual(acc.email, self.EMAIL)
        self.assertFalse(acc.is_active)
 
        acc = Account.objects.get(pk=acc.pk)
        self.assertFalse(acc.is_active)
 
        res = Account.objects.do_verify(account=acc, code=code)
        self.assertTrue(res)
        self.assertTrue(acc.is_active)
 
        acc = Account.objects.get(pk=acc.pk)