# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-from collections import OrderedDict
import unittest
from utils import run_in_component_init
]
# stream class
- sc = tc.create_stream_class(default_clock_class=clock_class,
- event_common_context_field_class=sec,
- packet_context_field_class=pc,
- supports_packets=True)
+ sc = tc.create_stream_class(
+ default_clock_class=clock_class,
+ event_common_context_field_class=sec,
+ packet_context_field_class=pc,
+ supports_packets=True,
+ )
# event context
ec = tc.create_structure_field_class()
def test_context_field(self):
packet, stream, pc_fc = self._create_packet(with_pc=True)
- self.assertEqual(packet.context_field.field_class.addr, pc_fc.addr)
+ self.assertEqual(packet.context_field.cls.addr, pc_fc.addr)
def test_no_context_field(self):
packet, _, _ = self._create_packet(with_pc=False)