def METHOD_NAME(admin, remoteci_context, topic, team_user_id):
    admin.post("/api/v1/topics/%s/teams" % topic["id"], data={"team_id": team_user_id})
    topic = _update_topic(admin, topic, {"state": "inactive"})
    data = {"topic_id": topic["id"]}
    r = remoteci_context.post("/api/v1/jobs/schedule", data=data)
    assert r.status_code == 412
    topic = _update_topic(admin, topic, {"state": "active"})
    data = {"topic_id": topic["id"]}
    r = remoteci_context.post("/api/v1/jobs/schedule", data=data)
    assert r.status_code == 201