示例#1
0
 def test_expired_confirmation_token(self):
     u = User(password='******')
     db.session.add(u)
     db.session.commit()
     token = u.generate_confirmation_token(1)
     time.sleep(2)
     self.assertFalse(u.confirm(token))
示例#2
0
	def test_expired_confirmation_token(self):
		u = User(password='******')
		db.session.add(u)
		db.session.commit()
		token = u.generate_confirmation_token(1)
		time.sleep(2)
		self.assertFalse(u.confirm(token))
示例#3
0
 def test_invalid_confirmation_token(self):
     u = User(password='******')
     u2 = User(password='******')
     db.session.add(u)
     db.session.add(u2)
     db.session.commit()
     token = u.generate_confirmation_token()
     self.assertFalse(u2.confirm(token))
示例#4
0
	def test_invalid_confirmation_token(self):
		u = User(password='******')
		u2 = User(password='******')
		db.session.add(u)
		db.session.add(u2)
		db.session.commit()
		token = u.generate_confirmation_token()
		self.assertFalse(u2.confirm(token))
示例#5
0
 def test_valid_confirmation_token(self):
     u = User(password='******')
     db.session.add(u)
     db.session.commit()
     token = u.generate_confirmation_token()
     self.assertTrue(u.confirm(token))
示例#6
0
	def test_valid_confirmation_token(self):
		u = User(password='******')
		db.session.add(u)
		db.session.commit()
		token = u.generate_confirmation_token()
		self.assertTrue(u.confirm(token))