Commit graph

45 commits

Author SHA1 Message Date
Hellowlol
6138c709cd first pass on tools and tests 2020-05-12 23:26:29 +02:00
Steffen Fredriksen
6daaa85f18
Merge pull request #471 from jjlawren/sonos_controls
Allow control of Sonos speakers using Plex API
2020-05-10 14:31:16 +02:00
Jason Lawrence
f55b8a1416 Add mocked tests for Sonos 2020-05-06 09:15:03 -05:00
Hellowlol
8ac2edb3f6 reduce deps 2020-05-02 01:29:26 +03:00
Hellowlol
c9052ef933 fix audio test
run black on some tests
2020-04-30 00:49:11 +03:00
Hellowlol
34c506107f update travis build
so we always test on the latest.
2020-04-16 23:51:18 +02:00
Hellowlol
ed3d16d1b0 som pytest 4 compat
and change to client timeline is can respond quicker.
2020-04-15 22:53:17 +02:00
Hellowlol
cc71daeaba sync 2020-04-15 20:41:15 +02:00
blacktwin
64013a32fa
Merge branch 'master' into patch-8 2019-10-04 22:49:02 -04:00
Michael Shepanski
a3ab143068 Comment out depicated config options 2019-10-02 21:47:02 -04:00
Michael Shepanski
73502f8f24 Register custom marks 2019-10-02 21:29:08 -04:00
Michael Shepanski
17f67ebdad Fix conftext to pass flake8 2019-10-02 20:58:00 -04:00
blacktwin
d5c58b4ac3
import mock_open 2019-09-24 14:35:29 -04:00
blacktwin
05fb2370c5
subtitle fixture 2019-09-23 23:13:17 -04:00
Hellowlol
56ffd6ebcf zomg 2019-09-21 23:17:35 +02:00
Hellowlol
5fa91dc5e1 first pass on fixing tests 2019-09-21 22:54:50 +02:00
blacktwin
319adf92fc
add collections fixture 2019-07-31 14:53:06 -04:00
Andrey Yantsen
e853f4eeee remove cpms from conftest.ENTITLEMENTS 2019-02-07 10:26:00 +00:00
Michael Shepanski
7ef2e40607 Add Not Rated content rating 2018-12-04 15:45:14 -05:00
Andrey Yantsen
06742e87e8 run tests over unclaimed server 2018-09-15 21:44:39 +01:00
Andrey Yantsen
68fc970d7a Improvements in tests process (#297)
* lets begin

* skip plexpass tests if there is not plexpass on account

* test new myplex attrubutes

* bootstrap: proper photos organisation

* fix rest of photos tests

* fix myplex new attributes test

* fix music bootstrap by setting agent to lastfm

* fix sync tests

* increase bootstrap timeout

* remove timeout from .travis.yml

* do not create playlist-style photoalbums in plex-bootstraptest.py

* allow negative filtering in LibrarySection.search()

* fix sync tests once again

* use sendCrashReports in test_settings

* fix test_settings

* fix test_video

* do not accept eula in bootstrap

* fix PlexServer.isLatest()

* add test against old version of PlexServer

* fix MyPlexAccount.OutOut

* add flag for one-time testing in Travis

* fix test_library onDeck tests

* fix more tests

* use tqdm in plex-bootstraptest for media scanning progress

* create sections one-by-one

* update docs on AlertListener for timeline entries

* fix plex-bootstraptest for server version 1.3.2

* display skip/xpass/xfail reasons

* fix tests on 1.3

* wait for music to be fully processed in plex-bootstraptest

* fix misplaced TEST_ACCOUNT_ONCE

* fix test_myplex_users, not sure if in proper-way

* add pytest-rerunfailures; mark test_myplex_optout as flaky

* fix comment

* Revert "add pytest-rerunfailures; mark test_myplex_optout as flaky"

This reverts commit 580e4c95a7.

* restart plex container on failure

* add conftest.wait_until() and used where some retries are required

* add more wait_until() usage in test_sync

* fix managed user search

* fix updating managed users in myplex

* allow to add new servers to existent users

* add new server to a shared user while bootstrapping

* add some docs on testing process

* perform few attemps when unable to get the claim token

* unlock websocket-client in requirements_dev

* fix docblock in tools/plex-teardowntest

* do not hardcode mediapart size in test_video

* remove cache:pip from travis

* Revert "unlock websocket-client in requirements_dev"

This reverts commit 0d536bd06d.

* remove debug from server.py

* improve webhook tests

* fix type() check to isinstance()

* remove excessive `else` branch due to Hellowlol advice

* add `unknown` as allowed `myPlexMappingState` in test_server
2018-09-14 20:03:23 +02:00
Andrey Yantsen
b6c061afd6 Bootstrap test plex (#290)
* fix markup in tests/conftest.py

* add plex-bootstraptest
2018-09-08 17:27:34 +02:00
Andrey Yantsen
54b26fdc25 Sync support (#282)
* [sync] initial commit

* fix populating of `state` field in sync.Status

* [connection] add posibliity to return first established connection faster

* [base] add timeout argument to PlexObject.fetchItems()

* [sync] add timeout arg to SyncItem.getMedia()

When you have multiple media within one SyncItem it takes a lot of time
to get all the info for this media (on my machine it takes about a
second for each movie).

* [sync] fix marking media as downloaded

* [sync] pass clientIdentifier to created SyncItem()

* [sync] override __repr__() for sync.Status

* fix after @mikes-nasuni`s review

* fix python2 compatibility

* get rid of sync.init()

* use list comprehension

* remove timeout from PlexObject.fetchItems()

* fix SyncItem under python 2.7

* fix __doc__ in sync module

* revert myplex._connect() back to it`s original state

* improve sync docs

* get rid of PlexObjects where not needed

* add X-Plex-Sync-Version=2 to headers

* add sync() method into Video, LibrarySection and MyPlexAccount

* add SyncItem.delete()

* add sync.Policy.create()

* use self._default_sync_title instead of _prettyfilename as default title

* let the tests begin

* add items for refreshing synclists to PlexServer

* fix sync tests

* sync for everybody!

* add TODO doctring for Audio._defaultSyncTitle()

* SyncItems tag may be presented only once, there is no need for loop

* add more TODO docstrings

* hello docs

* remove relative import

* remove unused variable from tests/test_sync.py
2018-09-08 17:25:16 +02:00
Hellowlol
0e2c7fb7e6 fixup
move delete to partial as not everything is deletable
fix library genre test
fix delete media.
2017-11-01 23:18:18 +01:00
Hellowlol
0cc573b477 change patch_http_call so we cant just pass it. 2017-10-29 00:07:06 +02:00
Hellowlol
0f16ea9cb7 fix invite and add editfriend. 2017-10-28 22:58:47 +02:00
Hellowlol
368482fd11 add mocked invite user and remove users.
Maybe this shoud be a integration test too.
2017-10-27 01:09:17 +02:00
Hellowlol
0594f24f8b mock delete properly 2017-10-26 23:55:59 +02:00
Hellowlol
a0f030e353 Add a test for share playlist. 2017-07-28 22:29:14 +02:00
Michael Shepanski
61f691fd7b No longer need username and password to run tests 2017-06-05 21:40:52 -04:00
Michael Shepanski
650a88d638 Started movinf client tests into Pytest framework 2017-05-12 23:25:57 -04:00
Michael Shepanski
47e4e8b902 Updated tests to use open source video details 2017-05-01 23:26:27 -04:00
Michael Shepanski
35fc7718f5 Tests now passing on personal server 2017-04-29 01:47:21 -04:00
Michael Shepanski
a5180b879f Use config to specify client and token; connect to PlexClient even if no token specified 2017-04-25 23:23:57 -04:00
Michael Shepanski
19039e1fed Cleanup client settings in pytest 2017-04-25 23:09:37 -04:00
Michael Shepanski
379b8ff63b Tests now pass for both test servers 2017-04-23 01:54:53 -04:00
Michael Shepanski
7ec909dce6 Finish generic tests; a few things to polish before merge 2017-04-23 01:18:53 -04:00
Michael Shepanski
29daf4c237 Update test_server 2017-04-16 23:33:33 -04:00
Michael Shepanski
5278d583bc Update test_playlist 2017-04-16 11:58:21 -04:00
Michael Shepanski
7bb39aa05c UPdating tests to work on second install 2017-04-14 20:47:59 -04:00
Michael Shepanski
e87a7346c6 Fix test 2017-02-27 00:36:20 -05:00
Michael Shepanski
4b1a564409 All config options can be set with environment variables; Update all os.environ calls to use CONFIG.get; Finish documenting configuration options. 2017-02-19 22:18:23 -05:00
Michael Shepanski
6a35f50a43 CHECKPOINT: Lots going on; Added new base class PlexObject that everything inherits from, this ensures all constructors are similar; Lots of work on new tool plexattrs that parses a full Plex library to find differences in attributes plexapi implements and what the Plex XML API offers up; Tests will most definetly be broken at this point, but I wanted to save my work. 2017-02-05 23:52:10 -05:00
Michael Shepanski
622c2490a0 Clean formatting 2017-02-01 23:47:22 -05:00
Michael Shepanski
45857f9fb7 Move pytests up to main tests folder; Move old tests to archived folder 2017-02-01 23:10:12 -05:00
Renamed from tests/tests_pytest/conftest.py (Browse further)