def test_is_plex_running_pid_file_with_max_pid(self): self.assertFalse( cleaner.is_plex_running(pid_file='./tests/dummy/max.pid'))
def test_is_plex_running_pid_file_with_ok_no_perm_pid(self): self.assertTrue( cleaner.is_plex_running(pid_file='./tests/dummy/ok_no_perm.pid'))
def test_is_plex_running_pid_file_with_bad_pid(self): with self.assertRaises(PlexCleanerException) as e: cleaner.is_plex_running(pid_file='./tests/dummy/bad.pid') self.assertIn('Unable to validate if Plex is running', e.exception.message)
def test_is_plex_running_no_pid_file(self): self.assertFalse( cleaner.is_plex_running(pid_file='/PlexMediaServer.pid'))