def test_constructor_explicit(self):
    span_id = 'test_span_id'
    span_name = 'test_span_name'
    parent_span = mock.Mock()
    start_time = utils.to_iso_str()
    end_time = utils.to_iso_str()
    attributes = {'http.status_code': '200', 'component': 'HTTP load balancer'}
    time_events = mock.Mock()
    links = mock.Mock()
    stack_trace = mock.Mock()
    status = mock.Mock()
    context_tracer = mock.Mock()
    span = self._make_one(name=span_name, parent_span=parent_span, attributes=attributes, start_time=start_time, end_time=end_time, span_id=span_id, stack_trace=stack_trace, time_events=time_events, links=links, status=status, context_tracer=context_tracer)
    self.assertEqual(span.name, span_name)
    self.assertIsNotNone(span.span_id)
    self.assertEqual(span.attributes, {})
    self.assertEqual(span.start_time, start_time)
    self.assertEqual(span.end_time, end_time)
    self.assertEqual(span.time_events, time_events)
    self.assertEqual(span.stack_trace, stack_trace)
    self.assertEqual(span.links, [])
    self.assertEqual(span.status, status)
    self.assertEqual(span.children, [])
    self.assertEqual(span.context_tracer, context_tracer)
def test_constructor_explicit(self):
    span_id = 'test_span_id'
    span_name = 'test_span_name'
    parent_span = mock.Mock()
    start_time = utils.to_iso_str()
    end_time = utils.to_iso_str()
    attributes = {'http.status_code': '200', 'component': 'HTTP load balancer'}
    time_events = mock.Mock()
    links = mock.Mock()
    stack_trace = mock.Mock()
    status = mock.Mock()
    context_tracer = mock.Mock()
    span = self._make_one(name=span_name, parent_span=parent_span, attributes=attributes, start_time=start_time, end_time=end_time, span_id=span_id, stack_trace=stack_trace, time_events=time_events, links=links, status=status, context_tracer=context_tracer)
    self.assertEqual(span.name, span_name)
    self.assertIsNotNone(span.span_id)
    self.assertEqual(span.attributes, {})
    self.assertEqual(span.start_time, start_time)
    self.assertEqual(span.end_time, end_time)
    self.assertEqual(span.time_events, time_events)
    self.assertEqual(span.stack_trace, stack_trace)
    self.assertEqual(span.links, [])
    self.assertEqual(span.status, status)
    self.assertEqual(span.children, [])
    self.assertEqual(span.context_tracer, context_tracer)