Ignore:
Timestamp:
7 Dec 2012, 10:57:53 (12 years ago)
Author:
uli
Message:

Update tests to reflect last changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r9763 r9788  
    55from zope.interface.verify import verifyObject, verifyClass
    66from waeup.kofa.interfaces import ICSVExporter
     7from waeup.kofa.students.catalog import StudentsQuery
    78from waeup.kofa.students.export import (
    89    StudentsExporter, StudentStudyCourseExporter, StudentStudyLevelExporter,
    910    CourseTicketExporter, PaymentsExporter, BedTicketsExporter,
    1011    StudentPaymentsOverviewExporter, StudentStudyLevelsOverviewExporter,
    11     get_students, StudentsExportFilter)
     12    get_students,)
    1213from waeup.kofa.students.accommodation import BedTicket
    1314from waeup.kofa.students.interfaces import ICSVStudentExporter
     
    4243    def test_get_students_by_session(self):
    4344        # we can filter out students of a certain session
    44         my_filter1 = StudentsExportFilter(current_session=2012)
     45        my_filter1 = StudentsQuery(current_session=2012)
    4546        result = get_students(self.app, stud_filter=my_filter1)
    4647        self.assertEqual(len(list(result)), 1)
    4748
    48         my_filter2 = StudentsExportFilter(current_session=1964)
     49        my_filter2 = StudentsQuery(current_session=1964)
    4950        result = get_students(self.app, stud_filter=my_filter2)
    5051        self.assertEqual(len(list(result)), 0)
     
    5354    def test_get_students_by_level(self):
    5455        # we can filter out students of a certain level
    55         my_filter1 = StudentsExportFilter(current_level=200)
     56        my_filter1 = StudentsQuery(current_level=200)
    5657        result = get_students(self.app, stud_filter=my_filter1)
    5758        self.assertEqual(len(list(result)), 1)
    5859
    59         my_filter2 = StudentsExportFilter(current_level=300)
     60        my_filter2 = StudentsQuery(current_level=300)
    6061        result = get_students(self.app, stud_filter=my_filter2)
    6162        self.assertEqual(len(list(result)), 0)
     
    6465    def test_get_students_by_deptcode(self):
    6566        # we can filter out students of a certain dept.
    66         my_filter1 = StudentsExportFilter(depcode='NA')
     67        my_filter1 = StudentsQuery(depcode='NA')
    6768        result = get_students(self.app, stud_filter=my_filter1)
    6869        self.assertEqual(len(list(result)), 1)
    6970
    70         my_filter2 = StudentsExportFilter(depcode='NOTEXISTING')
     71        my_filter2 = StudentsQuery(depcode='NOTEXISTING')
    7172        result = get_students(self.app, stud_filter=my_filter2)
    7273        self.assertEqual(len(list(result)), 0)
     
    7576    def test_get_students_by_faccode(self):
    7677        # we can filter out students of a certain faculty.
    77         my_filter1 = StudentsExportFilter(faccode='NA')
     78        my_filter1 = StudentsQuery(faccode='NA')
    7879        result = get_students(self.app, stud_filter=my_filter1)
    7980        self.assertEqual(len(list(result)), 1)
    8081
    81         my_filter2 = StudentsExportFilter(faccode='NOTEXISTING')
     82        my_filter2 = StudentsQuery(faccode='NOTEXISTING')
    8283        result = get_students(self.app, stud_filter=my_filter2)
    8384        self.assertEqual(len(list(result)), 0)
Note: See TracChangeset for help on using the changeset viewer.