mirror of
https://github.com/lepture/captcha.git
synced 2025-08-15 12:11:56 +08:00
refactor!: restructure the code, add type hints
This commit is contained in:
@ -1,15 +1,9 @@
|
||||
# coding: utf-8
|
||||
|
||||
import sys
|
||||
from captcha.image import ImageCaptcha
|
||||
|
||||
if not hasattr(sys, 'pypy_version_info'):
|
||||
from captcha.image import ImageCaptcha, WheezyCaptcha
|
||||
|
||||
def test_image_generate():
|
||||
captcha = ImageCaptcha()
|
||||
data = captcha.generate('1234')
|
||||
assert hasattr(data, 'read')
|
||||
|
||||
captcha = WheezyCaptcha()
|
||||
data = captcha.generate('1234')
|
||||
assert hasattr(data, 'read')
|
||||
def test_image_generate():
|
||||
captcha = ImageCaptcha()
|
||||
data = captcha.generate('1234')
|
||||
assert hasattr(data, 'read')
|
||||
|
Reference in New Issue
Block a user