#NEWLINE# def test_save_field_to_database( self ) : #NEWLINE# #INDENT# 'Basic Field Test' #NEWLINE# from testapp.models import TestModel #NEWLINE# from phonenumber_field.phonenumber import PhoneNumber #NEWLINE# tm = TestModel ( ) #NEWLINE# tm . phone = '+41 52 424 2424' #NEWLINE# tm . full_clean ( ) #NEWLINE# tm . save ( ) #NEWLINE# pk = tm . id #NEWLINE# tm = TestModel . objects . get ( pk = pk ) #NEWLINE# self . assertTrue ( isinstance ( pk . phone , PhoneNumber ) ) #NEWLINE# self . assertEqual ( str ( tm . phone ) , '+41524242424' )