Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)

src/l/e/leastauthority.com-HEAD/lae_automation/aws/queryapi.py   leastauthority.com(Download)
from txaws.util import XML
 
from lae_util.http_client import make_http_request
from lae_util.no_overwrite import update_by_keywords_without_overwrite
from lae_util import timestamp
    def _send_request(self, **params):
        url = self._build_request_url(params)
        return make_http_request(url)
 
    def _build_request_url(self, params):

src/l/e/leastauthority.com-HEAD/lae_util/test/test_http_client.py   leastauthority.com(Download)
from twisted.trial.unittest import TestCase
 
import mock
 
from lae_util.http_client import make_http_request
    def test_make_http_request(self, mockreactor, mockcfac):
 
        d = make_http_request('http://foo.faketld/banana?wombat')
 
        self.assertEqual(d, mockcfac.return_value.deferred)
    def test_make_http_request_with_port(self, mockreactor, mockcfac):
 
        d = make_http_request('http://bar.faketld:1234/banana?wombat')
 
        self.assertEqual(d, mockcfac.return_value.deferred)
    def test_make_https_request(self, mockreactor, mockcfac, mockssl):
 
        d = make_http_request('https://secure-foo.faketld/banana?wombat')
 
        self.assertEqual(d, mockcfac.return_value.deferred)
    def test_make_https_request_with_port(self, mockreactor, mockcfac, mockssl):
 
        d = make_http_request('https://secure-bar.faketld:1234/banana?wombat')
 
        self.assertEqual(d, mockcfac.return_value.deferred)