def test_send_works_as_expected(self):
        port = random.randint(50000, 60000)
        actual = channel.SenderBase("http://localhost:" + str(port) + "/track")
        actual.queue = channel.QueueBase(None)
        MockHTTPRequestHandler.ExpectedContent = "[42, 13]"
        MockHTTPRequestHandler.TestCase = self # save a reference to the test case in our handler
        thread = WorkerThread(actual)
        thread.start()
        runHttpHandlerOnce(handler=MockHTTPRequestHandler, port=port) # run the HTTP request
        thread.join()
        if "failed" in dir(self):
            self.fail(self.failed)
        self.assertEqual(None, actual.queue.get())
dataset/ETHPy150Open Microsoft/ApplicationInsights-Python/tests/applicationinsights_tests/channel_tests/TestSenderBase.py/TestSenderBase.test_send_works_as_expected/original