def test_calls_https(self): with patch.object(reactor, 'connectTCP') as f: connectDeviceHive('https://example.com', self.factory) self.assertTrue(f.called)
def test_calls_http(self): with patch('twisted.internet.reactor.connectTCP') as f: connectDeviceHive('http://example.com', self.factory) self.assertTrue(f.called)