'Verifies that user can see all the information, present on detail page according to their membership status.
Arguments:
num_members (int): number of users in a team
is_member (bool) default True: True if request user is member else False
max_size (int): number of users a team can have'

def assert_team_details(self, num_members, is_member=True, max_size=10):

    self.assertEqual(self.team_page.team_capacity_text, self.team_page.format_capacity_text(num_members, max_size))
    self.assertEqual(self.team_page.team_location, 'Afghanistan')
    self.assertEqual(self.team_page.team_language, 'Afar')
    self.assertEqual(self.team_page.team_members, num_members)
    if (num_members > 0):
        self.assertTrue(self.team_page.team_members_present)
    else:
        self.assertFalse(self.team_page.team_members_present)
    if is_member:
        self.assertEqual(self.team_page.team_user_membership_text, 'You    are    a    member    of    this    team.')
        self.assertTrue(self.team_page.team_leave_link_present)
        self.assertTrue(self.team_page.new_post_button_present)
    else:
        self.assertEqual(self.team_page.team_user_membership_text, '')
        self.assertFalse(self.team_page.team_leave_link_present)
        self.assertFalse(self.team_page.new_post_button_present)
