def test_verification_code_valid_numbers():
    form = forms.UserAccountVerification(data={
        'email': '*****@*****.**',
        'code': '02345',
    })
    assert form.is_valid()
    assert form.cleaned_data['code'] == '02345'
def test_verification_code_empty_email():

    form = forms.UserAccountVerification()

    assert isinstance(form.fields['email'], EmailField)
def test_verification_code_with_email():

    form = forms.UserAccountVerification(initial={'email': '*****@*****.**'})

    assert isinstance(form.fields['email'], CharField)