示例#1
0
def test_field(clients):
    illegalize(
        clients,
        "/api/{table}/item/{eid}/field/{field}",
        table=CONTRIB,
        eid=DUMMY_ID,
        field=TITLE,
    )
示例#2
0
def test_insertDetail(clients):
    illegalize(
        clients,
        "/api/{table}/{eid}/{dtable}/insert",
        table=CONTRIB,
        eid=DUMMY_ID,
        dtable=CONTRIB,
    )
示例#3
0
def test_itemDetail(clients):
    illegalize(
        clients,
        "/{table}/item/{eid}/open/{dtable}/{deid}",
        table=CONTRIB,
        eid=DUMMY_ID,
        dtable=CONTRIB,
        deid=DUMMY_ID,
    )
示例#4
0
def test_deleteDetail(clients):
    illegalize(
        clients,
        "/api/{table}/{masterId}/{dtable}/delete/{eid}",
        table=CONTRIB,
        masterId=DUMMY_ID,
        dtable=CONTRIB,
        eid=DUMMY_ID,
    )
示例#5
0
def test_itemPage(clients):
    illegalize(clients, "/{table}/item/{eid}", table=CONTRIB, eid=DUMMY_ID)
示例#6
0
def test_itemTitle(clients):
    illegalize(clients,
               "/api/{table}/item/{eid}/title",
               table=CONTRIB,
               eid=DUMMY_ID)
示例#7
0
def test_delete(clients):
    illegalize(clients,
               "/api/{table}/delete/{eid}",
               table=CONTRIB,
               eid=DUMMY_ID)
示例#8
0
def test_list(clients):
    illegalize(clients, "/{table}/list", table=CONTRIB)
示例#9
0
def test_listOpen(clients):
    illegalize(clients, "/{table}/list/{eid}", table=CONTRIB, eid=DUMMY_ID)
示例#10
0
def test_insert(clients):
    illegalize(clients, "/api/{table}/insert", table=CONTRIB)
示例#11
0
def test_task(clients):
    illegalize(clients,
               "/api/task/{task}/{eid}",
               task=SUBMIT_ASSESSMENT,
               eid=DUMMY_ID)
示例#12
0
def test_workflow(clients):
    url = "/workflow"
    expect = {user: 302 if user in {SYSTEM, ROOT} else 303 for user in USERS}
    forall(clients, expect, assertStatus, url)
    illegalize(clients, url)
示例#13
0
def test_info(clients):
    illegalize(clients, "/info")
    illegalize(clients, "/info.tsv")
示例#14
0
def test_home(clients):
    for url in ["/", "/index", "/index.html"]:
        illegalize(clients, url)