Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 972 Bytes

File metadata and controls

49 lines (35 loc) · 972 Bytes

Prerequisites

  • Python >= 3.8
  • uv (recommended) or pip

Setup

With uv (recommended)

$ uv venv
$ source .venv/bin/activate
$ uv sync

With pip

$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -e ".[examples,ntlm]"

Running tests

Most tests are end-to-end and run against a real tenant. Configure your credentials in a .env file:

export office365_python_sdk_securevars='{username};{password};{client_id};{client_password}'

This file is .gitignored. Source it before running tests:

$ . .env
$ pytest                        # all tests
$ pytest tests/test_sharepoint   # specific area

Required tenant roles

The test account needs these Azure AD roles assigned:

  • Global reader
  • Groups admin
  • Search admin
  • SharePoint admin
  • Teams service admin
  • Users admin