def test_not_recording(self):
    with mock.patch('opentelemetry.trace.INVALID_SPAN') as mock_span:
        RequestsInstrumentor().uninstrument()
        RequestsInstrumentor().instrument(tracer_provider=trace.NoOpTracerProvider())
        mock_span.is_recording.return_value = False
        result = self.perform_request(self.URL)
        self.assertEqual(result.text, 'Hello!')
        self.assert_span(None, 0)
        self.assertFalse(mock_span.is_recording())
        self.assertTrue(mock_span.is_recording.called)
        self.assertFalse(mock_span.set_attribute.called)
        self.assertFalse(mock_span.set_status.called)
def test_not_recording(self):
    with mock.patch('opentelemetry.trace.INVALID_SPAN') as mock_span:
        RequestsInstrumentor().uninstrument()
        RequestsInstrumentor().instrument(tracer_provider=trace.NoOpTracerProvider())
        mock_span.is_recording.return_value = False
        result = self.perform_request(self.URL)
        self.assertEqual(result.text, 'Hello!')
        self.assert_span(None, 0)
        self.assertFalse(mock_span.is_recording())
        self.assertTrue(mock_span.is_recording.called)
        self.assertFalse(mock_span.set_attribute.called)
        self.assertFalse(mock_span.set_status.called)