Ejemplo n.º 1
0
def edition_client(empty_app):
    """Client with token-based auth with ADMIN_EDITION permissions."""
    _c = TestClient(empty_app, EDITION_ADMIN_USERNAME, DEFAULT_PASSWORD)
    r = _c.get('/token')
    client = TestClient(empty_app, r.json['token'])
    return client
Ejemplo n.º 2
0
def client(empty_app):
    """Client with token-based auth, using the `app` application."""
    _c = TestClient(empty_app, DEFAULT_USERNAME, DEFAULT_PASSWORD)
    r = _c.get('/token')
    client = TestClient(empty_app, r.json['token'])
    return client
Ejemplo n.º 3
0
def product_client(empty_app):
    """Client with token-based auth with ADMIN_PRODUCT permissions."""
    _c = TestClient(empty_app, PRODUCT_ADMIN_USERNAME, DEFAULT_PASSWORD)
    r = _c.get('/token')
    client = TestClient(empty_app, r.json['token'])
    return client
Ejemplo n.º 4
0
def upload_build_client(empty_app):
    """Client with token-based auth with UPLOAD_BUILD permissions."""
    _c = TestClient(empty_app, BUILD_UPLOADER_USERNAME, DEFAULT_PASSWORD)
    r = _c.get('/token')
    client = TestClient(empty_app, r.json['token'])
    return client
Ejemplo n.º 5
0
def deprecate_build_client(empty_app):
    """Client with token-based auth with DEPRECATE_BUILD permissions."""
    _c = TestClient(empty_app, BUILD_DEPRECATOR_USERNAME, DEFAULT_PASSWORD)
    r = _c.get('/token')
    client = TestClient(empty_app, r.json['token'])
    return client
Ejemplo n.º 6
0
def edition_client(empty_app):
    """Client with token-based auth with ADMIN_EDITION permissions."""
    _c = TestClient(empty_app, EDITION_ADMIN_USERNAME, DEFAULT_PASSWORD)
    r = _c.get("/token")
    client = TestClient(empty_app, r.json["token"])
    return client
Ejemplo n.º 7
0
def product_client(empty_app):
    """Client with token-based auth with ADMIN_PRODUCT permissions."""
    _c = TestClient(empty_app, PRODUCT_ADMIN_USERNAME, DEFAULT_PASSWORD)
    r = _c.get("/token")
    client = TestClient(empty_app, r.json["token"])
    return client
Ejemplo n.º 8
0
def client(empty_app):
    """Client with token-based auth, using the `app` application."""
    _c = TestClient(empty_app, DEFAULT_USERNAME, DEFAULT_PASSWORD)
    r = _c.get("/token")
    client = TestClient(empty_app, r.json["token"])
    return client
Ejemplo n.º 9
0
def deprecate_build_client(empty_app):
    """Client with token-based auth with DEPRECATE_BUILD permissions."""
    _c = TestClient(empty_app, BUILD_DEPRECATOR_USERNAME, DEFAULT_PASSWORD)
    r = _c.get("/token")
    client = TestClient(empty_app, r.json["token"])
    return client
Ejemplo n.º 10
0
def upload_build_client(empty_app):
    """Client with token-based auth with UPLOAD_BUILD permissions."""
    _c = TestClient(empty_app, BUILD_UPLOADER_USERNAME, DEFAULT_PASSWORD)
    r = _c.get("/token")
    client = TestClient(empty_app, r.json["token"])
    return client