mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 03:33:08 +00:00
Update test_server.py
This commit is contained in:
parent
de52418cad
commit
562ac2dd75
1 changed files with 2 additions and 12 deletions
|
@ -132,24 +132,14 @@ def test_server_history(plex, movie):
|
||||||
movie.markUnwatched()
|
movie.markUnwatched()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.anonymously
|
#@pytest.mark.anonymously
|
||||||
|
#@pytest.mark.authenticated
|
||||||
def test_server_Server_query(plex):
|
def test_server_Server_query(plex):
|
||||||
assert plex.query('/')
|
assert plex.query('/')
|
||||||
with pytest.raises(NotFound):
|
with pytest.raises(NotFound):
|
||||||
assert plex.query('/asdf/1234/asdf', headers={'random_headers': '1234'})
|
assert plex.query('/asdf/1234/asdf', headers={'random_headers': '1234'})
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.authenticated
|
|
||||||
def test_server_Server_query_authenticated(plex):
|
|
||||||
assert plex.query('/')
|
|
||||||
with pytest.raises(BadRequest):
|
|
||||||
assert plex.query('/asdf/1234/asdf', headers={'random_headers': '1234'})
|
|
||||||
with pytest.raises(BadRequest):
|
|
||||||
# This is really requests.exceptions.HTTPError
|
|
||||||
# 401 Client Error: Unauthorized for url
|
|
||||||
PlexServer(utils.SERVER_BASEURL, '1234')
|
|
||||||
|
|
||||||
|
|
||||||
def test_server_Server_session(account):
|
def test_server_Server_session(account):
|
||||||
# Mock Sesstion
|
# Mock Sesstion
|
||||||
class MySession(Session):
|
class MySession(Session):
|
||||||
|
|
Loading…
Reference in a new issue