Ejemplo n.º 1
0
    def setUpClass(cls):
        super(TestCaseApplications, cls).setUpClass()
        cls.data_utils = data_helpers.DataHelpers()
        cls.user = UserFactory.create(is_partner=True)
        cls.data_utils.create_user_api_key(cls.user)
        cls.joiner = UserFactory.create(username='******')

        #Create the application only team
        cls.team = TeamMemberFactory.create(
            team__name='my application-only team',
            team__slug='application-only',
            team__membership_policy=1,
            user=cls.user).team

        #Create a user who has a pending application
        cls.joiner_app = ApplicationFactory.create(team=cls.team,
                                                   user=cls.joiner,
                                                   status=0,
                                                   note='let me in')

        # Create some additional applications the various status
        cls.joiners_list = []
        for x in range(0, 5):
            team_joiner = ApplicationFactory.create(team=cls.team,
                                                    user=UserFactory.create(),
                                                    status=x,
                                                    note='let me in, too').user
            cls.joiners_list.append(team_joiner.username)
        cls.joiners_list.append(cls.joiner.username)

        cls.a_team_pg = ATeamPage(cls)
Ejemplo n.º 2
0
 def setUpClass(cls):
     super(TestCaseOpenTeamPage, cls).setUpClass()
     cls.team_owner = UserFactory.create()
     cls.team = TeamMemberFactory.create(
         user = cls.team_owner).team
     cls.a_team_pg = ATeamPage(cls)
     cls.a_team_pg.open_team_page(cls.team.slug)
Ejemplo n.º 3
0
    def setUpClass(cls):
        super(TestCaseTeamProjectResource, cls).setUpClass()
        cls.data_utils = data_helpers.DataHelpers()

        cls.user = UserFactory.create(username='******', is_partner=True)
        cls.team_owner = UserFactory.create(username='******')
        cls.data_utils.create_user_api_key(cls.user)

        #create an open team with description text and 2 members
        cls.open_team = TeamMemberFactory.create(
            team__name="Cool team",
            team__slug='team-with-projects',
            team__description='this is the coolest, most creative team ever',
            user=cls.team_owner,
        ).team
        TeamAdminMemberFactory(team=cls.open_team, user=cls.user)
        #Open to the teams page so you can see what's there.
        cls.project1 = TeamProjectFactory(
            team=cls.open_team,
            name='team project one',
            slug='team-project-one',
            description='subtitle project number 1',
            guidelines='do a good job',
            workflow_enabled=False)

        cls.project2 = TeamProjectFactory(team=cls.open_team,
                                          name='team project two',
                                          workflow_enabled=True)

        cls.team_pg = ATeamPage(cls)
        cls.team_pg.open_team_page(cls.open_team.slug)
Ejemplo n.º 4
0
 def setUpClass(cls):
     super(TestCaseInvitationTeamPage, cls).setUpClass()
     cls.team_dir_pg = TeamsDirPage(cls)
     cls.a_team_pg = ATeamPage(cls)
     cls.members_tab = members_tab.MembersTab(cls)
     cls.team_owner = UserFactory.create()
     cls.team = TeamMemberFactory.create(team__membership_policy=2,
                                          user = cls.team_owner).team
     cls.a_team_pg.open_team_page(cls.team.slug)
Ejemplo n.º 5
0
    def setUpClass(cls):
        super(TestCaseTeamsPage, cls).setUpClass()
        cls.COOL_TEAM_NAME = "A1 Waay Cool team"

        #CREATE A USER
        cls.cool_user = UserFactory.create(username='******',
                                           password='******')

        cls.logger.info("creating some teams for testing")
        #create 5 open teams
        for x in range(5):
            TeamMemberFactory.create(team__name='my team ' + str(x),
                                     team__slug='my-team-' + str(x),
                                     user__username='******' + str(x),
                                     user__password='******')

        #create an open team with description text and 2 members
        cls.team = TeamMemberFactory.create(
            team__name="A1 Waay Cool team",
            team__slug='a1-waay-cool-team',
            team__description='this is the coolest, most creative team ever',
            user__username='******',
            user__password='******').team
        TeamMemberFactory.create(team=cls.team, user=cls.cool_user)
        TeamVideoFactory.create(team=cls.team, added_by=cls.cool_user)

        #create an application team with 3 members and 5 videos
        cls.app_team = TeamMemberFactory.create(
            team__name='the application-only team',
            team__slug='the-application-only-team',
            team__membership_policy=1,
            user__username='******',
            user__password='******').team
        TeamMemberFactory.create(team=cls.app_team, user=UserFactory.create())
        TeamMemberFactory.create(team=cls.app_team, user=cls.cool_user)
        for x in range(5):
            TeamVideoFactory.create(team=cls.app_team, added_by=cls.cool_user)

        #create 1 private team
        cls.priv_team = TeamMemberFactory.create(
            team__name='my own private idaho ',
            team__slug='private-idaho',
            team__membership_policy=1,
            team__is_visible=False,
            user__username='******',
            user__password='******').team

        cls.teams_dir_pg = TeamsDirPage(cls)
        cls.a_team_pg = ATeamPage(cls)
Ejemplo n.º 6
0
    def setUpClass(cls):
        super(TestCaseTeamMessages, cls).setUpClass()
        cls.a_team_pg = ATeamPage(cls)
        cls.members_tab = members_tab.MembersTab(cls)
        cls.messages_tab = messages_tab.MessagesTab(cls)
        cls.user_message_pg = user_messages_page.UserMessagesPage(cls)
        cls.non_member = UserFactory.create(username='******')
        cls.team_owner = UserFactory.create(is_partner=True)

        #CREATE AN APPLICATION-ONLY TEAM
        cls.team = TeamMemberFactory.create(
            team__membership_policy=1,
            user=cls.team_owner,
        ).team

        cls.team_member = TeamContributorMemberFactory.create(
            user=UserFactory(), team=cls.team).user

        #ADD THE TEST MESSAGES TO THE TEST TEAM
        cls.members_tab.open_members_page(cls.team.slug)
        cls.members_tab.log_in(cls.team_owner.username, 'password')
        cls.messages_tab.open_messages_tab(cls.team.slug)
        cls.messages_tab.edit_messages(cls._TEST_MESSAGES)