def test_requested_followers_card_template_titles(user): template = templates.RequestedFollowersCardTemplate(user.id, 1) assert template.title == 'You have 1 pending follow request' template = templates.RequestedFollowersCardTemplate(user.id, 2) assert template.title == 'You have 2 pending follow requests' template = templates.RequestedFollowersCardTemplate(user.id, 42) assert template.title == 'You have 42 pending follow requests'
def test_requested_followers_card_template(user): card_id = templates.RequestedFollowersCardTemplate.get_card_id(user.id) assert card_id.split(':') == [user.id, 'REQUESTED_FOLLOWERS'] template = templates.RequestedFollowersCardTemplate(user.id, 1) assert template.card_id == card_id assert template.user_id == user.id assert template.action == 'https://real.app/chat/' assert not template.only_usernames assert not template.post_id assert not template.comment_id
def requested_followers_card_template(card_manager, user): template = templates.RequestedFollowersCardTemplate(user.id, requested_followers_count=3) card_manager.add_or_update_card(template) yield template
def requested_followers_card_template(user): yield templates.RequestedFollowersCardTemplate(user.id, requested_followers_count=3)