Exemple #1
0
    def test_access_roster_partner_with_projects_login_not_reviewable(self):
        projCt = random.randint(1, 10)
        partnerProjList = []
        partner = UserFactory(password=self.password)
        partner_obj = PartnerFactory(email_address=partner.email)

        for i in range(0, projCt):
            partnerProjList.append(
                PartnerProjectInfoFactory(project=ProjectFactory(),
                                          partner=partner_obj))

        config.APPLICATIONS_REVIEWABLE = False
        self.user_login(partner)

        self.assertEqual(self.logonRedirect, self.selenium.current_url)

        self.selenium.get(
            '%s%s' %
            (self.live_server_url, reverse('display_student_team_roster')))

        expectedMsgs = ["Partners view the roster in applications."]
        for i, x in enumerate(
                self.selenium.find_elements_by_class_name("alert-info")):
            self.assertEqual(x.text, expectedMsgs[i])
        expectedMsg = "Applications are not yet open for review. If you believe you have received this message in error, please email [email protected]."
        self.assertEqual(
            expectedMsg,
            self.selenium.find_element_by_id("application-questions").text)
Exemple #2
0
    def setUpClass(cls):
        super().setUpClass()
        cls.password = '******'

        cls.user = UserFactory(password=cls.password)

        cls.partner = UserFactory(password=cls.password)
        cls.partner_obj = PartnerFactory(email_address=cls.partner.email)

        cls.student = UserFactory(password=cls.password)
        cls.student_obj = StudentFactory(email_address=cls.student.email)

        cls.admin = AdminFactory()

        cls.project = ProjectFactory()

        #default student
        cls.groupTypes = ['student', 'project']
        #default current Semester (config.CURRENT_SEMESTER)
        cls.semesters = [s[0] for s in Semester.choices]
        cls.semesterCt = len(cls.semesters)
        #default ALL IN
        cls.filters = ['Sub', 'Rni', 'Int', 'Rwi', 'Ofs', 'Ofr', 'Ofa']
        cls.filterTypes = ['ANY', 'ALL']
        #default 'students'
        cls.applicantTypes = ['students', 'scholars']
        cls.default_link_values = '&any_all=ANY&Sub=True&Rni=True&Int=True&Rwi=True&Ofs=True&Ofr=True&Ofa=True'
 def setUpClass(cls):
     super().setUpClass()
     cls.password = '******'
     cls.user = UserFactory(password=cls.password)
     cls.partner = UserFactory(password=cls.password)
     cls.partner_obj = PartnerFactory(email_address=cls.partner.email)
     cls.student = UserFactory(password=cls.password)
     cls.student_obj = StudentFactory(email_address=cls.student.email)
     cls.logon_redirect = "/profile/login?next=/profile/"
    def setUp(cls):
        cls.password = '******'

        cls.user = UserFactory(password=cls.password)

        cls.partner = UserFactory(password=cls.password)
        cls.partner_obj = PartnerFactory(email_address=cls.partner.email)

        cls.student = UserFactory(password=cls.password)
        cls.student_obj = StudentFactory(email_address=cls.student.email)

        cls.admin = AdminFactory()
    def setUpClass(cls):
        super().setUpClass()

        cls.password = '******'

        cls.user = UserFactory(password=cls.password)

        cls.partner = UserFactory(password=cls.password)
        cls.partner_obj = PartnerFactory(email_address=cls.partner.email)

        cls.student = UserFactory(password=cls.password)
        cls.student_obj = StudentFactory(email_address=cls.student.email)

        cls.project = ProjectFactory()
Exemple #6
0
    def test_access_student_signup_as_partner(self):

        partner = UserFactory(password=self.password)
        partner_obj = PartnerFactory(email_address=partner.email,
                                     first_name=partner.first_name,
                                     last_name=partner.last_name)

        projCt = random.randint(1, 10)
        partnerProjList = []

        for i in range(0, projCt):
            partnerProjList.append(
                PartnerProjectInfoFactory(project=ProjectFactory(),
                                          partner=partner_obj))

        self.user_login(partner)

        self.selenium.get('%s%s' %
                          (self.live_server_url, reverse('student_signup')))
        self.assertTrue(
            self.selenium.find_elements_by_xpath('//h3')[0].text ==
            'Edit Profile')

        student = StudentFactory(email_address=partner.email)
        ifield = [
            "first_name", "last_name", "student_id", "major", "resume_link",
            "general_question", "additional_skills"
        ]
        for j in range(0, len(ifield)):
            self.selenium.find_element_by_name(ifield[j]).send_keys(
                getattr(student, ifield[j]))

        bfield = ["college", "year"]
        for j in range(0, len(bfield)):
            Select(self.selenium.find_element_by_name(
                bfield[j])).select_by_value(getattr(student, bfield[j]))

        skillset = {}
        for skill in Student.default_skills:
            skillset[skill] = random.choice(
                list(filter(None, Student.skill_levels_options.keys())))
        for j in skillset:
            Select(self.selenium.find_element_by_name(j)).select_by_value(
                skillset[j])

        self.selenium.find_element_by_xpath("//input[@type='submit']").click()

        #show personal information page
        self.personal_information_page_validation(partner, partnerProjList)
    def setUp(cls):
        cls.password = '******'

        cls.user = UserFactory(password=cls.password)

        cls.partner = UserFactory(password=cls.password)
        cls.partner_obj = PartnerFactory(email_address=cls.partner.email)

        cls.student = UserFactory(password=cls.password)
        cls.student_obj = StudentFactory(email_address=cls.student.email)

        cls.admin = AdminFactory(password=cls.password)

        cls.sem_map = {k:v for k, v in Project.sem_mapping.items()}
        cls.app_status_map = {k:v for k, v in Application.app_status_mapping.items()}
    def test_access_get_profile_as_partner(self):

        partner = UserFactory(password=self.password)
        partner_obj = PartnerFactory(email_address=partner.email,
                                     first_name=partner.first_name,
                                     last_name=partner.last_name)

        projCt = random.randint(1, 10)
        partnerProjList = []

        for i in range(0, projCt):
            partnerProjList.append(
                PartnerProjectInfoFactory(project=ProjectFactory(),
                                          partner=partner_obj))

        self.user_login(partner)

        self.selenium.get('%s%s' %
                          (self.live_server_url, reverse('get_profile')))

        #show personal information page
        self.personal_information_page_validation(partner, partnerProjList)
Exemple #9
0
    def setUpClass(cls):
        super().setUpClass()
        cls.partner_values = {
            "email_address": "*****@*****.**",
            "first_name": "a",
            "last_name": "b"
        }
        cls.project_values = {
            "project_name": "Test Project Name",
            "organization": "Test Organization",
            "embed_link": "https://www.testproject.org",
            "semester": "SP21",
            "project_category": [],
            "student_num": 10,
            "description": "This is the description of a test project.",
            "organization_description":
            "This is the description of the test organization.",
            "timeline": "Soon...",
            "project_workflow": "We use Agile.",
            "dataset": "Photographs provided by the MET.",
            "deliverable":
            "Computer vision algorithm to identify time periods.",
            "skillset": "{'test skill A':'yes', 'test skill B':'ideally...'}",
            "additional_skills": "Positive attitude is a MUST.",
            "technical_requirements": "ML background."
        }

        cls.partner = PartnerFactory()
        cls.project = ProjectFactory()

        cls.partner_project_values = {
            "partner": cls.partner,
            "project": cls.project,
            "role": "Manager"
        }

        cls.partner_project = PartnerProjectInfoFactory(partner=cls.partner,
                                                        project=cls.project)
Exemple #10
0
 def setUpClass(cls):
     super().setUpClass()
     cls.partner_0 = PartnerFactory()
     cls.partner_1 = PartnerFactory()
     cls.partner_2 = PartnerFactory()