diff --git a/tests.py b/tests.py index f932b25..cf7dd14 100644 --- a/tests.py +++ b/tests.py @@ -21,7 +21,9 @@ class TestGeneral(unittest.TestCase): def test_playlist(self): data = self.cog.get_playlist_json() - with self.subTest(msg="Reddit doesn't return 200"): + if data.status_code >= 500: + self.skipTest(f"Server at {self.cog.muzak_url} has an error") + with self.subTest(msg=f"{self.cog.muzak_url} doesn't return 200"): self.assertEqual(data.status_code, 200) with self.subTest(msg="Not a good response"): self.assertIsInstance(data, requests.Response)