def test_sanitize_token_rejects_goofy_token(self):
     token = "ddddeeeeaaaadddd bbbbeeeeeeeefff"
     assert csrf._sanitize_token(token) is None
 def test_sanitize_token_passes_through_good_token(self):
     token = "ddddeeeeaaaaddddbbbbeeeeeeeeffff"
     assert csrf._sanitize_token(token) == token
Esempio n. 3
0
 def test_sanitize_token_rejects_underlong_token(self):
     token = 'ddddeeeeaaaaddddbbbbeeeeeeeefff'
     assert csrf._sanitize_token(token) is None
Esempio n. 4
0
 def test_sanitize_token_rejects_goofy_token(self):
     token = 'ddddeeeeaaaadddd bbbbeeeeeeeefff'
     assert csrf._sanitize_token(token) is None
Esempio n. 5
0
 def test_sanitize_token_passes_through_good_token(self):
     token = 'ddddeeeeaaaaddddbbbbeeeeeeeeffff'
     assert csrf._sanitize_token(token) == token
 def test_st_rejects_underlong_token(self):
     token = 'ddddeeeeaaaaddddbbbbeeeeeeeefff'
     assert csrf._sanitize_token(token) is None