def test_added_by_account_user_to_team(self): # What happens when a user adds a video to a team, and both the user # and team have accounts linked. It's not clear what we should do, # but for now, we just use the team account assert_items_equal( lookup_youtube_accounts(self.videourl_in_team_account, self.user, self.team), [self.team_account])
def test_multiple_team_accounts(self): team_account2 = YouTubeAccountFactory(channel_id="team2", team=self.team) assert_items_equal( lookup_youtube_accounts(self.videourl_in_team_account, UserFactory(), self.team), [self.team_account])
def test_video_added_to_linked_team(self): assert_items_equal( lookup_youtube_accounts(self.videourl_in_team_account, UserFactory(), self.team), [self.team_account])
def test_video_added_to_other_team(self): assert_items_equal( lookup_youtube_accounts(self.videourl_in_team_account, UserFactory(), TeamFactory()), [])
def test_public_video_added_by_other_user(self): assert_items_equal( lookup_youtube_accounts(self.videourl_in_user_account, UserFactory(), None), [self.user_account])