Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

Commit

Permalink
Tweak self fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
pauloromeira committed May 6, 2018
1 parent 19c68d3 commit c754ae5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from betamax_serializers import pretty_json
from pathlib import Path

from onegram.exceptions import NotSupportedError
from onegram import Login, Unlogged
from onegram import post_info, user_info
from onegram import posts
Expand Down Expand Up @@ -89,6 +90,8 @@ def user(session, logged, recorder, test_username):
@pytest.fixture
def self(session, logged, recorder):
if not logged:
with pytest.raises(NotSupportedError):
user_info()
return None

recorder.use_cassette(f'fixture_self[{_logged_id(logged)}]')
Expand Down

0 comments on commit c754ae5

Please sign in to comment.