Changeset 7189


Ignore:
Timestamp:
25 Nov 2011, 07:07:23 (13 years ago)
Author:
Henrik Bettermann
Message:

Managers can access studycourse even if student doesn't have a certificate (regression test)

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studycoursepage.pt

    r7171 r7189  
    3232      </td>
    3333    </tr>
    34     <tr>
     34    <tr tal:condition="view/context/certificate">
    3535      <td>
    3636        <label>
     
    4545      </td>
    4646    </tr>
    47     <tr>
     47    <tr tal:condition="view/context/certificate">
    4848      <td>
    4949        <label>
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py

    r7188 r7189  
    356356                           self.browser.contents)
    357357        return
     358
     359    def test_manage_access_wo_certificate(self):
     360        # Managers can access studycourse even if student
     361        # doesn't have a certificate
     362        student = Student()
     363        student.fullname = u'Lazy Student'
     364        self.app['students'].addStudent(student)
     365        student_id = student.student_id
     366        student_path = self.container_path + '/' + student_id
     367        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     368        self.browser.open(student_path + '/studycourse')
     369        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     370        self.assertEqual(self.browser.url, student_path + '/studycourse')
     371        self.assertMatches('...<div class="widget">Nothing</div>...',
     372                           self.browser.contents)
    358373
    359374    def test_manage_upload_file(self):
Note: See TracChangeset for help on using the changeset viewer.