示例#1
0
    def setUpClass(cls):
        super(TestCaseTeamMessages, cls).setUpClass()
        cls.data_utils = data_helpers.DataHelpers()
        cls.a_team_pg = ATeamPage(cls)
        cls.members_tab = members_tab.MembersTab(cls)
        cls.messages_tab = messages_tab.MessagesTab(cls)
        cls.modal = site_modals.SiteModals(cls)
        cls.user_message_pg = user_messages_page.UserMessagesPage(cls)
        cls.non_member = UserFactory()
        cls.admin = UserFactory()
        cls.manager = UserFactory()
        cls.member = UserFactory()

        cls.team = TeamFactory(admin=cls.admin,
                               manager=cls.manager,
                               member=cls.member,
                               )
        cls.team.membership_policy = 1
        cls.team.save()

        #ADD THE TEST MESSAGES TO THE TEST TEAM
        cls.members_tab.open_members_page(cls.team.slug)
        cls.members_tab.log_in(cls.admin.username, 'password')
        cls.messages_tab.open_messages_tab(cls.team.slug)
        cls.messages_tab.edit_messages(cls._TEST_MESSAGES)
示例#2
0
    def setUpClass(cls):
        super(TestCaseTeamMessages, cls).setUpClass()
        cls.data_utils = data_helpers.DataHelpers()
        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 = TeamMemberFactory.create(role="ROLE_CONTRIBUTOR",
                                           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)
示例#3
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)
示例#4
0
 def setUpClass(cls):
     super(TestCaseMembersTab, cls).setUpClass()
     cls.team_dir_pg = TeamsDirPage(cls)
     cls.user_message_pg = user_messages_page.UserMessagesPage(cls)
     cls.members_tab = members_tab.MembersTab(cls)
     cls.user = UserFactory()
     cls.admin = UserFactory()
     cls.manager = UserFactory()
     cls.member = UserFactory()
     cls.team = TeamFactory(admin=cls.admin,
                            manager=cls.manager,
                            member=cls.member)
     cls.promoted_manager = TeamMemberFactory(
         role=TeamMember.ROLE_CONTRIBUTOR, team=cls.team).user
     cls.promoted_admin = TeamMemberFactory(
         role=TeamMember.ROLE_CONTRIBUTOR, team=cls.team).user
     cls.project = ProjectFactory(team=cls.team)
     cls.members_tab.open_members_page(cls.team.slug)