Commit graph

33 commits

Author SHA1 Message Date
JonnyWong16
556b4b3da4
Use edit mixins for Playlists (#1284)
* Use mixins to edit playlists

* Add titleSort attribute to Playlists

* Update Playlists edit tests

* Fix deprecation warning stacklevel

* Fix edit title for m3u playlist
2023-11-13 10:29:03 -08:00
Dr.Blank
56a8df659d
Update algorithm for parsing smart filters (#1276)
* Fix minor typo

* Update algorithm for parsing  #1274

* Match style guide of the module

* Fix Edge Cases

- `and` is now considered the default operation instead of raising error
- fix algorithm so that the reserved keys are parsed in the filters dictionary instead of filters group when located later in the feed.
- removed some code repetition

* Join multiple filters by default

If multiple filter groups are parsed they are joined by `and` instead of raising error.

* fix `==` operator parsing

transfers "=" from the value to key

* fix typehinting

* Add new test for smart Filters

this test would fail on old algorithm despite it being logically the exact same filter.

* add test for deeply nested filters

* combine filters test for playlist

* combine filters test for collections

* fix typo

* add test to check parsed fitlers as it is

* edited test to be independent of the server

* Apply suggestions from code review

adhere to style guide of the project

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>

---------

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2023-11-05 16:23:57 -08:00
JonnyWong16
9dbb2e5169
Create music playlist from m3u file (#1055)
* Create music playlists from m3u files

* Add test for playlist m3u import

* Add createCollection examples
2022-12-21 11:32:43 -08:00
JonnyWong16
020a32f2b8
Update PlexAPI to f-strings (#1000)
* Update plexapi to f-strings

* Update tests to f-strings
2022-08-27 22:56:01 -07:00
JonnyWong16
a9ffd1e738
Fix image mixins tests (#856)
* Unlock images after edit image test

* Enable playlist art mixins tests

* Mark all image mixins tests as xfail

* Changing images can fail randomly
2021-11-20 17:14:34 -08:00
JonnyWong16
3fce24587d
Merge pull request #810 from JonnyWong16/feature/web_url
Add methods to retrieve the Plex Web URL
2021-10-04 12:38:24 -07:00
JonnyWong16
692a23586c
Add methods to lock and unlock artwork and posters (#825)
* Add private _edit method

* Add fields attribute to playlists

* Add lock and unlock methods to art, banner, and poster mixins

* Add tests for locking and unlocking art and posters
2021-09-12 19:56:21 -05:00
JonnyWong16
8a0b03c841
Merge branch 'master' into feature/web_url 2021-09-12 15:16:39 -07:00
JonnyWong16
3bebeaacd5
Add tests for Plex Web URLs 2021-08-25 18:10:11 -07:00
JonnyWong16
96a35dc379
Update Playlists test for posters 2021-08-25 18:10:02 -07:00
JonnyWong16
42260aa1b6
Add libtype argument for creating smart playlists (#799)
* Add libtype keyword argument for smart playlists

* Update docs, remove libtype collection from smart playlists/collections

* Cannot create a smart playlist or collection from other collections

* Update smart playlist filter test for libtype
2021-07-26 20:46:30 -05:00
JonnyWong16
e51d8253f3
Add tests for smart collection/playlist filters 2021-06-18 14:34:53 -07:00
JonnyWong16
c31c5317b3
Update playlist tests for NotFound when removing or moving items 2021-06-02 09:27:35 -07:00
JonnyWong16
4458977988 Improve test coverage 2021-05-29 19:26:31 -07:00
JonnyWong16
7800e892ae
Add Playlist attrs test 2021-05-29 19:00:59 -07:00
JonnyWong16
6f2ef5c519
Fix collections and playlists tests 2021-05-29 18:05:42 -07:00
JonnyWong16
82e71793b1
Update playlist tests 2021-05-29 16:57:38 -07:00
JonnyWong16
810c5566c3
Fix playlist tests 2020-12-24 09:21:29 -08:00
JonnyWong16
33b725d8d4
Update tests 2020-12-23 23:03:08 -08:00
jjlawren
589941fb17
Remove playlist created during tests (#611) 2020-12-03 22:56:08 -06:00
jjlawren
fb82bc402b
Playqueue improvements (#563)
* Allow creating PlayQueues with multiple items, appending items

* Fix single-item playqueues, fix 'next', fix docstrings, run black

* Docstring updates

* More documentation fixes

* Allow removing items from a PlayQueue

* Use f-strings for readability

* Add ability to move items within the PlayQueue

* Cast attributes to proper types, update docs

* Format with black

* flake8 and sphinx fixes

* Reformat with black

* Update __contains__ to accept media objects

* Operate using media items, use methods similar to playlists

* Rename parameter to better match behavior

* Help users by automatically finding appropriate playQueueItemID values

* Add refresh method, auto-refresh before modifying playqueues

* Reformat with black

* Add TAG and TYPE to PlayQueue objects

* Review comments, add playQueueSelectedMetadataItemKey for Chromecast convenience

* Allow setting the playback start point in the PlayQueue

* Add tests, simplify size check

* Use camel case for helper function

* Add a helper to provide the selected item media object
2020-09-11 16:23:27 -05:00
Hellowlol
c9052ef933 fix audio test
run black on some tests
2020-04-30 00:49:11 +03:00
Hellowlol
c5083c311c fix test.. 2018-11-17 00:33:56 +01:00
Hellowlol
e0796e2d9e add test for smart playlist 2018-11-17 00:20:21 +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
Hellowlol
807b6ebc3c add more tests to inc cov. 2017-10-25 21:53:52 +02:00
Michael Shepanski
943aa02e69 Rename playlist.share to playlist.copyToUser; Make plex.myPlexSubscription a bool; Fix a few tests with updated attrs; Skip test_copyToUser if no subscription 2017-08-11 15:14:32 -04:00
Hellowlol
a0f030e353 Add a test for share playlist. 2017-07-28 22:29:14 +02:00
Michael Shepanski
35fc7718f5 Tests now passing on personal server 2017-04-29 01:47:21 -04:00
Michael Shepanski
5278d583bc Update test_playlist 2017-04-16 11:58:21 -04:00
Hellowlol
5e18776ee2 add support to shuffle to createplayqueue and playlist.playqueue
See the tests for examples.
2017-02-14 22:12:56 +01: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/test_playlist.py (Browse further)