From 73502f8f24c816666ad5c86da1fd07bd26578b75 Mon Sep 17 00:00:00 2001 From: Michael Shepanski Date: Wed, 2 Oct 2019 21:29:08 -0400 Subject: [PATCH] Register custom marks --- pytest.ini | 6 ++++++ tests/conftest.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 pytest.ini diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 00000000..a6a6e371 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,6 @@ +[pytest] +markers = + client: this is a client test. + req_client: require a client to run this test. + anonymously: test plexapi anonymously. + authenticated: test plexapi authenticated. diff --git a/tests/conftest.py b/tests/conftest.py index dac35f2f..7c5755d5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -12,6 +12,8 @@ from plexapi.compat import patch, MagicMock from plexapi.client import PlexClient from plexapi.server import PlexServer + + SERVER_BASEURL = plexapi.CONFIG.get('auth.server_baseurl') MYPLEX_USERNAME = plexapi.CONFIG.get('auth.myplex_username') MYPLEX_PASSWORD = plexapi.CONFIG.get('auth.myplex_password') @@ -34,8 +36,6 @@ ENTITLEMENTS = {'ios', 'roku', 'android', 'xbox_one', 'xbox_360', 'windows', 'wi TEST_AUTHENTICATED = 'authenticated' TEST_ANONYMOUSLY = 'anonymously' - - ANON_PARAM = pytest.param(TEST_ANONYMOUSLY, marks=pytest.mark.anonymous) AUTH_PARAM = pytest.param(TEST_AUTHENTICATED, marks=pytest.mark.authenticated)