Skip to content

Commit

Permalink
add ne and ne test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellowlol committed Oct 13, 2017
1 parent bdee9ad commit b5a3018
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions plexapi/base.py
Expand Up @@ -11,6 +11,7 @@
'iexact': lambda v, q: v.lower() == q.lower(),
'contains': lambda v, q: q in v,
'icontains': lambda v, q: q.lower() in v.lower(),
'ne': lambda v, q: v != q,
'in': lambda v, q: v in q,
'gt': lambda v, q: v > q,
'gte': lambda v, q: v >= q,
Expand Down
4 changes: 4 additions & 0 deletions tests/test_video.py
Expand Up @@ -10,6 +10,10 @@ def test_video_Movie(movies, movie):
assert movie2.title == movie.title


def test_video_ne(movies):
assert len(movies.fetchItems('/library/sections/7/all', title__ne='Sintel')) == 3


def test_video_Movie_delete(monkeypatch, movie):
monkeypatch.delattr('requests.sessions.Session.request')
with pytest.raises(AttributeError):
Expand Down

0 comments on commit b5a3018

Please sign in to comment.