예제 #1
0
def test_rating():
    timestamps = [datetime.now(), None]
    for timestamp in timestamps:
        response = rate(FakeMedia(), 10, timestamp)
        assert response['added'] == {
            'episodes': 2, 'movies': 1, 'seasons': 1, 'shows': 1
        }
        assert len(response['not_found']['movies']) == 1
예제 #2
0
 def rate(self, rating):
     """Rate this :class:`TVEpisode` on trakt. Depending on the current users
     settings, this may also send out social updates to facebook, twitter,
     tumblr, and path.
     """
     rate(self, rating)
예제 #3
0
def test_rating():
    timestamps = [datetime.now(), None]
    for timestamp in timestamps:
        response = rate(FakeMedia(), 10, timestamp)
        assert response is None
예제 #4
0
파일: tv.py 프로젝트: mampersat/PyTrakt
 def rate(self, rating):
     """Rate this :class:`TVEpisode` on trakt. Depending on the current users
     settings, this may also send out social updates to facebook, twitter,
     tumblr, and path.
     """
     rate(self, rating)
예제 #5
0
파일: test_sync.py 프로젝트: zodman/PyTrakt
def test_rating():
    timestamps = [datetime.now(), None]
    for timestamp in timestamps:
        response = rate(FakeMedia(), 10, timestamp)
        assert response is None