示例#1
0
文件: tests.py 项目: ksh/gpitraining
    def test_registration(self):
        """Test student registration."""
        email = '*****@*****.**'
        name1 = 'Test Student'
        name2 = 'John Smith'
        name3 = 'Pavel Simakov'

        actions.login(email)

        actions.register(self, name1)
        actions.check_profile(self, name1)

        actions.change_name(self, name2)
        actions.unregister(self)

        actions.register(self, name3)
        actions.check_profile(self, name3)
示例#2
0
文件: tests.py 项目: dgerod/cb4oeu
    def test_registration(self):
        """Test student registration."""
        email = '*****@*****.**'
        name1 = 'Test Student'
        name2 = 'John Smith'
        name3 = u'Pavel Simakov (тест данные)'

        actions.login(email)

        actions.register(self, name1)
        actions.check_profile(self, name1)

        actions.change_name(self, name2)
        actions.unregister(self)

        actions.register(self, name3)
        actions.check_profile(self, name3)
示例#3
0
文件: tests.py 项目: ksh/gpitraining
    def test_course_pass(self):
        """Test student passing final exam."""
        email = '*****@*****.**'
        name = 'Test Pass'

        post = {'assessment_type': 'postcourse', 'score': '100.00'}

        # Register.
        actions.login(email)
        actions.register(self, name)

        # Submit answer.
        response = self.submit_assessment('Post', post)
        assert_equals(response.status_int, 200)
        assert_contains('Your score is 70%', response.body)
        assert_contains('you have passed the course', response.body)

        # Check that the result shows up on the profile page.
        response = actions.check_profile(self, name)
        assert_contains('70', response.body)
        assert_contains('100', response.body)
示例#4
0
文件: tests.py 项目: dgerod/cb4oeu
    def test_course_pass(self):
        """Test student passing final exam."""
        email = '*****@*****.**'
        name = 'Test Pass'

        post = {'assessment_type': 'postcourse', 'score': '100.00'}

        # Register.
        actions.login(email)
        actions.register(self, name)

        # Submit answer.
        response = self.submit_assessment('Post', post)
        assert_equals(response.status_int, 200)
        assert_contains('Your score is 70%', response.body)
        assert_contains('you have passed the course', response.body)

        # Check that the result shows up on the profile page.
        response = actions.check_profile(self, name)
        assert_contains('70', response.body)
        assert_contains('100', response.body)