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

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

src/d/j/django-otp-0.2.7/django_otp/plugins/otp_static/tests.py   django-otp(Download)
 
        self.assertTrue(form.is_valid())
        alice = form.get_user()
        self.assertTrue(alice.get_username() == 'alice')
        self.assertTrue(isinstance(alice.otp_device, StaticDevice))
 
        self.assertTrue(not form.is_valid())
        alice = form.get_user()
        self.assertTrue(alice.get_username() == 'alice')
        self.assertTrue(alice.otp_device is None)
 
        self.assertTrue(not form.is_valid())
        alice = form.get_user()
        self.assertTrue(alice.get_username() == 'alice')
        self.assertTrue(alice.otp_device is None)
 
        self.assertTrue(form.is_valid())
        alice = form.get_user()
        self.assertTrue(alice.get_username() == 'alice')
        self.assertTrue(alice.otp_device is not None)

src/d/j/django-otp-0.2.7/django_otp/plugins/otp_email/tests.py   django-otp(Download)
 
        self.assertTrue(not form.is_valid())
        alice = form.get_user()
        self.assertTrue(alice.get_username() == 'alice')
        self.assertTrue(alice.otp_device is None)