<s> from __future__ import unicode_literals <EOL> import ipaddress <EOL> from nose . plugins . attrib import attr <EOL> from tornado . testing import gen_test <EOL> from . base_tests import GraphPropertyBaseClassTestCase , create_key <EOL> from goblin . properties . properties import IPV6 , IPV6WithV4 <EOL> from goblin . models import Vertex <EOL> from goblin . _compat import print_ <EOL> class IPV6TestVertex ( Vertex ) : <EOL> element_type = '<STR_LIT>' <EOL> test_val = IPV6 ( ) <EOL> @ attr ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> class IPV6VertexTestCase ( GraphPropertyBaseClassTestCase ) : <EOL> @ gen_test <EOL> def test_ipv6_io ( self ) : <EOL> print_ ( "<STR_LIT>" ) <EOL> key = IPV6TestVertex . get_property_by_name ( '<STR_LIT>' ) <EOL> yield create_key ( key , '<STR_LIT>' ) <EOL> dt = yield IPV6TestVertex . create ( <EOL> test_val = ipaddress . IPv6Address ( '<STR_LIT>' ) ) <EOL> print_ ( "<STR_LIT>" % dt ) <EOL> dt2 = yield IPV6TestVertex . get ( dt . _id ) <EOL> print_ ( "<STR_LIT>" % dt2 ) <EOL> self . assertEqual ( dt2 . test_val , dt . test_val ) <EOL> print_ ( "<STR_LIT>" ) <EOL> yield dt2 . delete ( ) <EOL> dt = yield IPV6TestVertex . create ( test_val = '<STR_LIT>' ) <EOL> print_ ( "<STR_LIT>" % dt ) <EOL> dt2 = yield IPV6TestVertex . get ( dt . _id ) <EOL> print_ ( "<STR_LIT>" % dt2 ) <EOL> self . assertEqual ( str ( dt2 . test_val ) , '<STR_LIT>' ) <EOL> print_ ( "<STR_LIT>" ) <EOL> yield dt2 . delete ( ) <EOL> class IPV64TestVertex ( Vertex ) : <EOL> element_type = '<STR_LIT>' <EOL> test_val = IPV6WithV4 ( ) </s>
