<s> import unittest <EOL> from mixbox . vendor . six import u <EOL> from cybox . objects . address_object import Address <EOL> from cybox . objects . network_connection_object import ( Layer7Connections , <EOL> NetworkConnection ) <EOL> from cybox . test import EntityTestCase , round_trip <EOL> from cybox . test . objects import ObjectTestCase <EOL> class TestNetworkConnection ( ObjectTestCase , unittest . TestCase ) : <EOL> object_type = "<STR_LIT>" <EOL> klass = NetworkConnection <EOL> _full_dict = { <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : u ( "<STR_LIT>" ) , <EOL> '<STR_LIT>' : u ( "<STR_LIT>" ) , <EOL> '<STR_LIT>' : u ( "<STR_LIT>" ) , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : Address . CAT_IPV4 , <EOL> '<STR_LIT>' : u ( "<STR_LIT>" ) , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> } , <EOL> '<STR_LIT:port>' : { <EOL> '<STR_LIT>' : <NUM_LIT> , <EOL> '<STR_LIT>' : u ( "<STR_LIT>" ) , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> } , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> } , <EOL> '<STR_LIT>' : u ( "<STR_LIT>" ) , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : Address . CAT_IPV4 , <EOL> '<STR_LIT>' : u ( "<STR_LIT>" ) , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> } , <EOL> '<STR_LIT:port>' : { <EOL> '<STR_LIT>' : <NUM_LIT> , <EOL> '<STR_LIT>' : u ( "<STR_LIT>" ) , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> } , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> } , <EOL> '<STR_LIT>' : u ( "<STR_LIT>" ) , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> } <EOL> } , <EOL> '<STR_LIT>' : object_type , <EOL> } <EOL> def test_tcp_states ( self ) : <EOL> nc = NetworkConnection ( ) <EOL> nc . source_tcp_state = "<STR_LIT>" <EOL> nc . destination_tcp_state = "<STR_LIT>" <EOL> nc2 = round_trip ( nc ) <EOL> self . assertEqual ( nc . to_dict ( ) , nc2 . to_dict ( ) ) <EOL> class TestLayer7Connections ( EntityTestCase , unittest . TestCase ) : <EOL> klass = Layer7Connections <EOL> _full_dict = { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> } , <EOL> '<STR_LIT>' : [ <EOL> { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT:value>' : u ( "<STR_LIT>" ) , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> } , <EOL> '<STR_LIT>' : u ( "<STR_LIT:A>" ) , <EOL> '<STR_LIT>' : u ( "<STR_LIT>" ) , <EOL> } , <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> } , <EOL> { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT:value>' : u ( "<STR_LIT>" ) , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> } , <EOL> '<STR_LIT>' : u ( "<STR_LIT>" ) , <EOL> } , <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> } , <EOL> ] <EOL> } <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
