Exemplo n.º 1
0
def test_pre_simile_missing_id():

    obj = atomtools.ejsonize(filesource('rfc4287-1-1-2.atom').source)
    obj[0][u'type'] = u'atom:entry'
    del obj[0][u'id']
    prepped = exhibit.prep(obj, schema=PIPELINES)
    return
Exemplo n.º 2
0
def test_pre_simile1():
    obj = atomtools.ejsonize(filesource('rfc4287-1-1-2.atom').source)
    obj[0][u'type'] = u'atom:entry'
    #del obj[0][u'id']
    #import pprint; pprint.pprint(obj, stream=sys.stderr)
    prepped = exhibit.prep(obj, schema=PIPELINES)
    #import pprint; pprint.pprint(prepped, stream=sys.stderr)
    return
Exemplo n.º 3
0
def test_pre_simile_missing_field():
    obj = atomtools.ejsonize(filesource('rfc4287-1-1-2.atom').source)
    obj[0][u'type'] = u'atom:entry'
    #Add a requirement for a "spam" field
    epipelines_plus_spam = {u'spam': (first_item, exhibit.REQUIRE)}
    epipelines_plus_spam.update(ENTRY_PIPELINE)
    new_pipelines = { u'atom:entry': epipelines_plus_spam } #Don't bother with atom:feed; unused in test
    prepped = exhibit.prep(obj, schema=new_pipelines)
    return