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

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

src/r/o/ro-manager-HEAD/src/roverlay/rovweb/rovserver/tests.py   ro-manager(Download)
 
from MiscUtils.HttpSession       import HTTP_Error, HTTP_Session
from MiscUtils.MockHttpResources import MockHttpFileResources, MockHttpDictResources
 
from rocommand.ro_namespaces import RDF, RO, ORE, AO
    def test_MockHttpResources(self):
        testbaseuri  = "http://testdomain.org/testdata/ro-test-1/"
        testbasepath = os.path.join(TestBaseDir, "ro-test-1/")
        with MockHttpFileResources(testbaseuri, testbasepath):
            hs = HTTP_Session(testbaseuri)
            , testbaseuri+"subdir2/subdir2-file.txt"
            ])
        with MockHttpFileResources(testbaseuri, testbasepath):
            ro_uri = self.create_test_ro(testbaseuri, ro_uri_list)
            r = c.get(ro_uri, HTTP_ACCEPT="application/rdf+xml")
            , testbaseuri+"subdir2/subdir2-file.txt"
            ])
        with MockHttpFileResources(testbaseuri, testbasepath):
            ro_uri = self.create_test_ro(testbaseuri, ro_uri_list)
            r = c.get(ro_uri, HTTP_ACCEPT="text/turtle;charset=UTF-8")

src/r/o/ro-manager-0.2.20/roverlay/rovweb/rovserver/tests.py   ro-manager(Download)
 
from MiscUtils.HttpSession       import HTTP_Error, HTTP_Session
from MiscUtils.MockHttpResources import MockHttpFileResources, MockHttpDictResources
 
from rocommand.ro_namespaces import RDF, RO, ORE, AO
    def test_MockHttpResources(self):
        testbaseuri  = "http://testdomain.org/testdata/ro-test-1/"
        testbasepath = os.path.join(TestBaseDir, "ro-test-1/")
        with MockHttpFileResources(testbaseuri, testbasepath):
            hs = HTTP_Session(testbaseuri)
            , testbaseuri+"subdir2/subdir2-file.txt"
            ])
        with MockHttpFileResources(testbaseuri, testbasepath):
            ro_uri = self.create_test_ro(testbaseuri, ro_uri_list)
            r = c.get(ro_uri, HTTP_ACCEPT="application/rdf+xml")
            , testbaseuri+"subdir2/subdir2-file.txt"
            ])
        with MockHttpFileResources(testbaseuri, testbasepath):
            ro_uri = self.create_test_ro(testbaseuri, ro_uri_list)
            r = c.get(ro_uri, HTTP_ACCEPT="text/turtle;charset=UTF-8")