jasonrollins / shareplum

Pythonic SharePoint
MIT License
179 stars 96 forks source link

Running the test suite #152

Open dHannasch opened 3 years ago

dHannasch commented 3 years ago

I'm trying to make it easier for anyone to run the test suite when making any changes. In particular, for people who have GitLab and Sharepoint, I'm setting up https://gitlab.com/dHannasch/shareplum/-/blob/gitlab-ci-yml/.gitlab-ci.yml to run the tests automatically.

(The long-term hope is that even as people gain and lose Sharepoint, if running the tests is push-button enough, there will always be someone tangentially affiliated with the project who still has Sharepoint and can run the tests. With a mirror-capable GitLab, it would in fact be completely automatic.)

I'm currently running into a snag where the unit tests don't seem to work for anything but Office365. https://github.com/jasonrollins/shareplum/blob/master/tests/test_site.py#L20 There's a conditional, https://github.com/jasonrollins/shareplum/blob/master/tests/test_site.py#L15 but it seems to be ignored and the authentication is always done with Office365.

There doesn't seem to be a test for just normal Site('https://abc.com/sites/MySharePointSite/', auth=auth).

I'm planning to fiddle with this, but I thought I'd drop you a line just in case I'm missing something obvious.