From 201466a52fafaf24a2032a32e4cd60bef27a75b6 Mon Sep 17 00:00:00 2001 From: Hellowlol Date: Sat, 2 May 2020 00:32:46 +0300 Subject: [PATCH] Allow failure --- plexapi/base.py | 2 +- tests/test_gdm.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tests/test_gdm.py diff --git a/plexapi/base.py b/plexapi/base.py index d2362ab1..117eb7cf 100644 --- a/plexapi/base.py +++ b/plexapi/base.py @@ -1,4 +1,4 @@ -def # -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- import re from plexapi import log, utils diff --git a/tests/test_gdm.py b/tests/test_gdm.py new file mode 100644 index 00000000..f1cb5ac6 --- /dev/null +++ b/tests/test_gdm.py @@ -0,0 +1,15 @@ +import pytest +from plexapi.gdm import GDM + + +@pytest.mark.xfail(reason="Might fail on docker", strict=False) +def test_gdm(plex): + gdm = GDM() + + gdm_enabled = plex.settings.get("GdmEnabled") + + gdm.scan(timeout=2) + if gdm_enabled: + assert len(gdm.entries) + else: + assert not len(gdm.entries)