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
def anon_client(empty_app): """Anonymous client.""" client = TestClient(empty_app, '', '') return client
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
def basic_client(empty_app): """Client with username/password auth, using the `app` application.""" client = TestClient(empty_app, DEFAULT_USERNAME, DEFAULT_PASSWORD) return client
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
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
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
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
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
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
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
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