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

All Samples(243)  |  Call(188)  |  Derive(0)  |  Import(55)

        def server():
    global SERVER_URI
    if SERVER_URI is None:
        # No server specified and need to start my own
        port = start_server()
        SERVER_URI = "http://localhost:%d/" % port

    return SERVER_URI
        


src/i/n/ingestion-HEAD/test/test_uva.py   ingestion(Download)
# coding: utf-8
 
from server_support import server, H
from amara.thirdparty import json
from nose.tools import nottest
    EXPECTED_CREATOR = ["Holsinger, Rufus W., 1866-1930"]
 
    url = server() + "mods-to-dpla?provider=UVA"
    resp, content = H.request(url, "POST", body=INPUT_JSON)
    assert str(resp.status).startswith("2"), str(resp) + "\n" + content

src/i/n/ingestion-HEAD/test/test_usc_set_dataprovider.py   ingestion(Download)
from server_support import server, print_error_log, H
from amara.thirdparty import json
from dict_differ import DictDiffer, assert_same_jsons, pinfo
 
def _get_server_response(body):
    url = server() + "usc_set_dataprovider"

src/i/n/ingestion-HEAD/test/test_usc_enrich_location.py   ingestion(Download)
import sys
from amara.thirdparty import json
from server_support import server, H, print_error_log
from dict_differ import assert_same_jsons
 
url = server() + "usc_enrich_location"

src/i/n/ingestion-HEAD/test/test_uiuc_enrich_location.py   ingestion(Download)
import sys
from server_support import server, H, print_error_log
from amara.thirdparty import json
from dplaingestion.akamod.uiuc_enrich_location import is_spatial, format_spatial
 
    }
 
    url = server() + "uiuc_enrich_location"
    resp,content = H.request(url,"POST",body=json.dumps(INPUT))
    assert resp.status == 200

src/i/n/ingestion-HEAD/test/test_uiuc_cleanup_spatial_name.py   ingestion(Download)
from server_support import server, print_error_log, H
from amara.thirdparty import json
from dict_differ import DictDiffer, assert_same_jsons, pinfo
 
def _get_server_response(body):
    url = server() + "uiuc_cleanup_spatial_name"

src/i/n/ingestion-HEAD/test/test_texas_enrich_location.py   ingestion(Download)
from server_support import server, H
from amara.thirdparty import json
 
def test_texas_enrich_location1():    
    """Should map city, county, state, and country"""
    }
 
    url = server() + "texas_enrich_location"
    resp,content = H.request(url,"POST",body=json.dumps(INPUT))
    assert resp.status == 200
    }
 
    url = server() + "texas_enrich_location"
    resp,content = H.request(url,"POST",body=json.dumps(INPUT))
    assert resp.status == 200
    }
 
    url = server() + "texas_enrich_location"
    resp,content = H.request(url,"POST",body=json.dumps(INPUT))
    assert resp.status == 200
    }
 
    url = server() + "texas_enrich_location"
    resp,content = H.request(url,"POST",body=json.dumps(INPUT))
    assert resp.status == 200

src/i/n/ingestion-HEAD/test/test_set_type_from_physical_format.py   ingestion(Download)
import sys
from server_support import server, print_error_log
from amara.thirdparty import httplib2
from amara.thirdparty import json
from dict_differ import assert_same_jsons
def _get_server_response(body):
    url = server() + "set_type_from_physical_format"
    return H.request(url, "POST", body=body, headers=CT_JSON)
 
def test_set_type_from_physical_format1():

src/i/n/ingestion-HEAD/test/test_set_spec_type.py   ingestion(Download)
from server_support import server, print_error_log, H
from amara.thirdparty import json
from dict_differ import DictDiffer, assert_same_jsons, pinfo
 
def _get_server_response(body, prop=None):
    url = server() + "set_spec_type"

src/i/n/ingestion-HEAD/test/test_set_prop.py   ingestion(Download)
import sys
from server_support import server, print_error_log
from amara.thirdparty import httplib2
from amara.thirdparty import json
from urllib import urlencode
def _get_server_response(body, action="set", **kwargs):
    url = server() + "%s_prop?%s" % (action, urlencode(kwargs))
 
    return H.request(url, "POST", body=body, headers=CT_JSON)
 

src/i/n/ingestion-HEAD/test/test_scdl_geocode_regions.py   ingestion(Download)
import re
import sys
from server_support import server, H, print_error_log
from amara.thirdparty import json
from dplaingestion.akamod.scdl_geocode_regions import is_region, geocode_region

  1 | 2 | 3 | 4 | 5 | 6  Next