<s> import pytest <EOL> @ pytest . yield_fixture ( ) <EOL> def team_for_regular_user ( db , regular_user , readonly_user ) : <EOL> from app . modules . teams . models import Team , TeamMember <EOL> team = Team ( title = "<STR_LIT>" ) <EOL> db . session . add ( team ) <EOL> regular_user_team_member = TeamMember ( team = team , user = regular_user , is_leader = True ) <EOL> db . session . add ( regular_user_team_member ) <EOL> readonly_user_team_member = TeamMember ( team = team , user = readonly_user ) <EOL> db . session . add ( readonly_user_team_member ) <EOL> db . session . commit ( ) <EOL> yield team <EOL> db . session . delete ( readonly_user_team_member ) <EOL> db . session . delete ( regular_user_team_member ) <EOL> db . session . delete ( team ) <EOL> db . session . commit ( ) </s>
