diff --git a/setup.py b/setup.py index 935f6a4..fbfa6a9 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 import os diff --git a/uw_sws/__init__.py b/uw_sws/__init__.py index 4d8400e..87c9c7c 100644 --- a/uw_sws/__init__.py +++ b/uw_sws/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 import json diff --git a/uw_sws/adviser.py b/uw_sws/adviser.py index f6c108a..a56870d 100644 --- a/uw_sws/adviser.py +++ b/uw_sws/adviser.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 # Interfacing with the search for a student's academic advisers diff --git a/uw_sws/campus.py b/uw_sws/campus.py index f8211dc..a9bb899 100644 --- a/uw_sws/campus.py +++ b/uw_sws/campus.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ diff --git a/uw_sws/college.py b/uw_sws/college.py index f966e23..16ce128 100644 --- a/uw_sws/college.py +++ b/uw_sws/college.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ diff --git a/uw_sws/compat.py b/uw_sws/compat.py index 46aa6fe..e8b7473 100644 --- a/uw_sws/compat.py +++ b/uw_sws/compat.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ diff --git a/uw_sws/course.py b/uw_sws/course.py index 15d5342..9fea963 100644 --- a/uw_sws/course.py +++ b/uw_sws/course.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ diff --git a/uw_sws/curriculum.py b/uw_sws/curriculum.py index e3d9415..be74afb 100644 --- a/uw_sws/curriculum.py +++ b/uw_sws/curriculum.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ diff --git a/uw_sws/dao.py b/uw_sws/dao.py index f6edea9..06a0904 100644 --- a/uw_sws/dao.py +++ b/uw_sws/dao.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ diff --git a/uw_sws/degree.py b/uw_sws/degree.py index 3930d8c..acb3a7f 100644 --- a/uw_sws/degree.py +++ b/uw_sws/degree.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 # Interfacing with the search for a student's degree status diff --git a/uw_sws/department.py b/uw_sws/department.py index 98434b5..c946736 100644 --- a/uw_sws/department.py +++ b/uw_sws/department.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ diff --git a/uw_sws/enrollment.py b/uw_sws/enrollment.py index 26c9bb2..3b6c0d0 100644 --- a/uw_sws/enrollment.py +++ b/uw_sws/enrollment.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ diff --git a/uw_sws/exceptions.py b/uw_sws/exceptions.py index 7406ee7..2ce98b5 100644 --- a/uw_sws/exceptions.py +++ b/uw_sws/exceptions.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from restclients_core.exceptions import DataFailureException diff --git a/uw_sws/financial.py b/uw_sws/financial.py index 5918f6e..ca195e4 100644 --- a/uw_sws/financial.py +++ b/uw_sws/financial.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 import logging diff --git a/uw_sws/models.py b/uw_sws/models.py index 7dd731e..6969fd7 100644 --- a/uw_sws/models.py +++ b/uw_sws/models.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 import json @@ -106,7 +106,8 @@ class SwsPerson(models.Model): permanent_phone = models.CharField(max_length=64, null=True, blank=True) visa_type = models.CharField(max_length=2, null=True, blank=True) veteran_code = models.CharField(max_length=2) - resident_code = models.SmallIntegerField(null=True) + resident_code = models.CharField(max_length=2, null=True) + resident_desc = models.CharField(max_length=64, null=True) def is_veteran(self): return self.veteran_code != "0" @@ -135,9 +136,10 @@ def json_data(self): 'permanent_address': get_student_address_json( self.permanent_address), 'permanent_phone': self.permanent_phone, - 'visa_type': self.visa_type, + 'resident_desc': self.resident_desc, + 'resident_code': self.resident_code, 'veteran_code': self.veteran_code, - 'resident_code': self.resident_code + 'visa_type': self.visa_type } def __str__(self): @@ -1397,6 +1399,8 @@ class Enrollment(models.Model): is_registered = models.NullBooleanField() has_pending_major_change = models.NullBooleanField() has_pending_resident_change = models.NullBooleanField() + pending_resident_code = models.CharField(max_length=2, null=True) + pending_resident_desc = models.CharField(max_length=64, null=True) def __init__(self, *args, **kwargs): self.registrations = [] @@ -1425,6 +1429,10 @@ def __init__(self, *args, **kwargs): json_data.get('Metadata', ''), ENROLLMENT_SOURCE_PCE) self.has_pending_resident_change = json_data.get( 'PendingResidentChange', False) + self.pending_resident_code = json_data.get( + 'PendingResident') + self.pending_resident_desc = json_data.get( + 'PendingResidencyDescription') self.term = kwargs.get("term") @@ -1479,6 +1487,8 @@ def json_data(self): 'is_registered': self.is_registered, 'has_pending_major_change': self.has_pending_major_change, 'has_pending_resident_change': self.has_pending_resident_change, + 'pending_resident_code': self.pending_resident_code, + 'pending_resident_desc': self.pending_resident_desc, 'registrations': [r.json_data( include_section_ref=True) for r in self.registrations], 'majors': [m.json_data() for m in self.majors], diff --git a/uw_sws/notice.py b/uw_sws/notice.py index 44ddbf9..cc41826 100644 --- a/uw_sws/notice.py +++ b/uw_sws/notice.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ diff --git a/uw_sws/person.py b/uw_sws/person.py index dfbdfb3..680978b 100644 --- a/uw_sws/person.py +++ b/uw_sws/person.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ @@ -80,5 +80,6 @@ def _process_json_data(person_data): person.uwnetid = person_data.get("UWNetID") person.visa_type = person_data.get("VisaType") person.resident_code = person_data.get("Resident") + person.resident_desc = person_data.get("ResidencyDescription") return person diff --git a/uw_sws/registration.py b/uw_sws/registration.py index 514838a..f86cfe2 100644 --- a/uw_sws/registration.py +++ b/uw_sws/registration.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ diff --git a/uw_sws/resources/sws/file/student/v4/enrollment/2013_spring_9136CCB8F66711D5BE060004AC494FFE.json b/uw_sws/resources/sws/file/student/v4/enrollment/2013_spring_9136CCB8F66711D5BE060004AC494FFE.json index 81537ab..467e584 100644 --- a/uw_sws/resources/sws/file/student/v4/enrollment/2013_spring_9136CCB8F66711D5BE060004AC494FFE.json +++ b/uw_sws/resources/sws/file/student/v4/enrollment/2013_spring_9136CCB8F66711D5BE060004AC494FFE.json @@ -25,6 +25,8 @@ "PendingHonorsChange": false, "PendingMajorChange": false, "PendingResidentChange": false, + "PendingResident": "0", + "PendingResidencyDescription": null, "PendingSpecialProgramChange": false, "Person": { "Href": "/student/v4/person/9136CCB8F66711D5BE060004AC494FFE.json", diff --git a/uw_sws/resources/sws/file/student/v5/enrollment.json_reg_id_9136CCB8F66711D5BE060004AC494FFE_verbose_true_transcriptable_course_all_changed_since_date_ b/uw_sws/resources/sws/file/student/v5/enrollment.json_reg_id_9136CCB8F66711D5BE060004AC494FFE_verbose_true_transcriptable_course_all_changed_since_date_ index 23eeacb..6433093 100644 --- a/uw_sws/resources/sws/file/student/v5/enrollment.json_reg_id_9136CCB8F66711D5BE060004AC494FFE_verbose_true_transcriptable_course_all_changed_since_date_ +++ b/uw_sws/resources/sws/file/student/v5/enrollment.json_reg_id_9136CCB8F66711D5BE060004AC494FFE_verbose_true_transcriptable_course_all_changed_since_date_ @@ -36,6 +36,8 @@ "PendingHonorsChange": false, "PendingMajorChange": false, "PendingResidentChange": false, + "PendingResidencyDescription": null, + "PendingResident": "0", "PendingSpecialProgramChange": false, "Person": { "Href": "/student/v5/person/9136CCB8F66711D5BE060004AC494FFE.json", @@ -249,6 +251,8 @@ "PendingHonorsChange": false, "PendingMajorChange": false, "PendingResidentChange": false, + "PendingResidencyDescription": null, + "PendingResident": "0", "PendingSpecialProgramChange": false, "Person": { "Href": "/student/v5/person/9136CCB8F66711D5BE060004AC494FFE.json", @@ -503,6 +507,8 @@ "PendingHonorsChange": false, "PendingMajorChange": false, "PendingResidentChange": false, + "PendingResidencyDescription": null, + "PendingResident": "0", "PendingSpecialProgramChange": false, "Person": { "Href": "/student/v5/person/9136CCB8F66711D5BE060004AC494FFE.json", @@ -725,6 +731,8 @@ "PendingHonorsChange": false, "PendingMajorChange": false, "PendingResidentChange": false, + "PendingResidencyDescription": null, + "PendingResident": "0", "PendingSpecialProgramChange": false, "Person": { "Href": "/student/v5/person/9136CCB8F66711D5BE060004AC494FFE.json", @@ -901,6 +909,8 @@ "PendingHonorsChange": false, "PendingMajorChange": false, "PendingResidentChange": false, + "PendingResidencyDescription": null, + "PendingResident": "0", "PendingSpecialProgramChange": false, "Person": { "Href": "/student/v5/person/9136CCB8F66711D5BE060004AC494FFE.json", @@ -1106,7 +1116,9 @@ "PendingClassChange": false, "PendingHonorsChange": false, "PendingMajorChange": true, - "PendingResidentChange": true, + "PendingResidentChange": false, + "PendingResidencyDescription": null, + "PendingResident": "0", "PendingSpecialProgramChange": false, "Person": { "Href": "/student/v5/person/9136CCB8F66711D5BE060004AC494FFE.json", @@ -1313,6 +1325,8 @@ "PendingHonorsChange": false, "PendingMajorChange": false, "PendingResidentChange": false, + "PendingResidencyDescription": null, + "PendingResident": "0", "PendingSpecialProgramChange": false, "Person": { "Href": "/student/v5/person/9136CCB8F66711D5BE060004AC494FFE.json", diff --git a/uw_sws/resources/sws/file/student/v5/person/00000000000000000000000000000001.json b/uw_sws/resources/sws/file/student/v5/person/00000000000000000000000000000001.json index 64eca9a..0db1cca 100644 --- a/uw_sws/resources/sws/file/student/v5/person/00000000000000000000000000000001.json +++ b/uw_sws/resources/sws/file/student/v5/person/00000000000000000000000000000001.json @@ -14,6 +14,7 @@ "PermanentPhone":null, "RegID":"00000000000000000000000000000001", "RegisteredName":null, + "ResidencyDescription": null, "Resident":null, "StudentName":"SYSTEM OVERHEAD", "StudentNumber":null, diff --git a/uw_sws/resources/sws/file/student/v5/person/12345678901234567890123456789012.json b/uw_sws/resources/sws/file/student/v5/person/12345678901234567890123456789012.json index 443363f..472430e 100644 --- a/uw_sws/resources/sws/file/student/v5/person/12345678901234567890123456789012.json +++ b/uw_sws/resources/sws/file/student/v5/person/12345678901234567890123456789012.json @@ -27,7 +27,8 @@ "PermanentPhone":null, "RegID":"12345678901234567890123456789012", "RegisteredName":"EIGHT STUDENT", - "Resident":"5", + "ResidencyDescription": "NONRESIDENT CITIZEN", + "Resident": "3", "StudentName":"Eight Student", "StudentNumber":"1443336", "StudentSystemKey":"000083857", diff --git a/uw_sws/resources/sws/file/student/v5/person/9136CCB8F66711D5BE060004AC494F31.json b/uw_sws/resources/sws/file/student/v5/person/9136CCB8F66711D5BE060004AC494F31.json index 4f079bd..fb71b05 100644 --- a/uw_sws/resources/sws/file/student/v5/person/9136CCB8F66711D5BE060004AC494F31.json +++ b/uw_sws/resources/sws/file/student/v5/person/9136CCB8F66711D5BE060004AC494F31.json @@ -26,7 +26,8 @@ "Zip":""}, "PermanentPhone":null, "RegID":"9136CCB8F66711D5BE060004AC494F31", - "Resident":null, + "ResidencyDescription": "NONRESIDENT STUDENT VISA", + "Resident": "5", "StudentName":"Chakrabarti,Japendra", "StudentNumber":"1233334", "StudentSystemKey":"000018235", diff --git a/uw_sws/resources/sws/file/student/v5/person/9136CCB8F66711D5BE060004AC494FFE.json b/uw_sws/resources/sws/file/student/v5/person/9136CCB8F66711D5BE060004AC494FFE.json index fe5c673..f67d4d2 100644 --- a/uw_sws/resources/sws/file/student/v5/person/9136CCB8F66711D5BE060004AC494FFE.json +++ b/uw_sws/resources/sws/file/student/v5/person/9136CCB8F66711D5BE060004AC494FFE.json @@ -26,7 +26,7 @@ "Zip":"98005-1234"}, "PermanentPhone":"2065555555", "RegID":"9136CCB8F66711D5BE060004AC494FFE", - "Resident":1, + "Resident":"1", "ResidencyDescription": "RESIDENT", "StudentName":"John Joseph Average", "StudentNumber":"1033334", diff --git a/uw_sws/section.py b/uw_sws/section.py index bef777f..86330bc 100644 --- a/uw_sws/section.py +++ b/uw_sws/section.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ diff --git a/uw_sws/section_status.py b/uw_sws/section_status.py index 98b5f39..b29d00d 100644 --- a/uw_sws/section_status.py +++ b/uw_sws/section_status.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from uw_sws.exceptions import InvalidSectionID diff --git a/uw_sws/term.py b/uw_sws/term.py index c1c8173..c936216 100644 --- a/uw_sws/term.py +++ b/uw_sws/term.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ diff --git a/uw_sws/test.py b/uw_sws/test.py index 7353e9a..4f94ea7 100644 --- a/uw_sws/test.py +++ b/uw_sws/test.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 # This is just a test runner for coverage diff --git a/uw_sws/tests/compatible.py b/uw_sws/tests/compatible.py index 3fec767..a7a3ae3 100644 --- a/uw_sws/tests/compatible.py +++ b/uw_sws/tests/compatible.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_adviser.py b/uw_sws/tests/test_adviser.py index 55ea421..a0cc4e9 100644 --- a/uw_sws/tests/test_adviser.py +++ b/uw_sws/tests/test_adviser.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_campus.py b/uw_sws/tests/test_campus.py index 618a17a..1851444 100644 --- a/uw_sws/tests/test_campus.py +++ b/uw_sws/tests/test_campus.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_college.py b/uw_sws/tests/test_college.py index d479a14..b5b14a4 100644 --- a/uw_sws/tests/test_college.py +++ b/uw_sws/tests/test_college.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_course.py b/uw_sws/tests/test_course.py index 4b18967..e28613e 100644 --- a/uw_sws/tests/test_course.py +++ b/uw_sws/tests/test_course.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_curriculum.py b/uw_sws/tests/test_curriculum.py index f7f808e..f92859c 100644 --- a/uw_sws/tests/test_curriculum.py +++ b/uw_sws/tests/test_curriculum.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_dao.py b/uw_sws/tests/test_dao.py index e43116e..1a30381 100644 --- a/uw_sws/tests/test_dao.py +++ b/uw_sws/tests/test_dao.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_degree.py b/uw_sws/tests/test_degree.py index 55956aa..b3bcda9 100644 --- a/uw_sws/tests/test_degree.py +++ b/uw_sws/tests/test_degree.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_department.py b/uw_sws/tests/test_department.py index 24c55f6..fb34d77 100644 --- a/uw_sws/tests/test_department.py +++ b/uw_sws/tests/test_department.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_enrollment.py b/uw_sws/tests/test_enrollment.py index 0f02846..ddfdc61 100644 --- a/uw_sws/tests/test_enrollment.py +++ b/uw_sws/tests/test_enrollment.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase @@ -291,4 +291,10 @@ def test_pending_resident(self): result_dict = enrollment_search_by_regid( '9136CCB8F66711D5BE060004AC494FFE') self.assertFalse(result_dict[t1].has_pending_resident_change) - self.assertTrue(result_dict[t2].has_pending_resident_change) + self.assertIsNone(result_dict[t2].pending_resident_desc) + self.assertEqual(result_dict[t1].pending_resident_code, "0") + self.assertFalse(result_dict[t2].has_pending_resident_change) + self.assertEqual( + result_dict[t2].json_data()["pending_resident_code"], "0") + self.assertIsNone( + result_dict[t2].json_data()["pending_resident_desc"]) diff --git a/uw_sws/tests/test_financial.py b/uw_sws/tests/test_financial.py index b2dc1f2..a735545 100644 --- a/uw_sws/tests/test_financial.py +++ b/uw_sws/tests/test_financial.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_independent_study.py b/uw_sws/tests/test_independent_study.py index 8ee8b79..c146cbb 100644 --- a/uw_sws/tests/test_independent_study.py +++ b/uw_sws/tests/test_independent_study.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_instructor_no_regid.py b/uw_sws/tests/test_instructor_no_regid.py index 0e2e960..c67c13b 100644 --- a/uw_sws/tests/test_instructor_no_regid.py +++ b/uw_sws/tests/test_instructor_no_regid.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_notice.py b/uw_sws/tests/test_notice.py index 9e166cb..dff7209 100644 --- a/uw_sws/tests/test_notice.py +++ b/uw_sws/tests/test_notice.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_person.py b/uw_sws/tests/test_person.py index 047700f..b38aeab 100644 --- a/uw_sws/tests/test_person.py +++ b/uw_sws/tests/test_person.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase @@ -51,7 +51,8 @@ def test_person_resource(self): "/student/v5/term/2013,autumn.json") self.assertEqual(data.last_enrolled.quarter, "autumn") self.assertEqual(data.last_enrolled.year, 2013) - self.assertEqual(data.resident_code, 1) + self.assertEqual(data.resident_code, "1") + self.assertEqual(data.resident_desc, "RESIDENT") def test_person_jinter(self): data = get_person_by_regid("9136CCB8F66711D5BE060004AC494F31") @@ -89,7 +90,8 @@ def test_person_jinter(self): self.assertEqual(data.permanent_address.postal_code, "400001") self.assertEqual(data.permanent_address.state, "Mumbai") self.assertEqual(data.permanent_address.zip_code, "") - self.assertIsNone(data.resident_code) + self.assertEqual(data.resident_code, "5") + self.assertEqual(data.resident_desc, "NONRESIDENT STUDENT VISA") data = get_person_by_regid("12345678901234567890123456789012") self.assertTrue(data.is_J1()) @@ -118,8 +120,15 @@ def test_person_none(self): self.assertIsNone(data.permanent_phone) self.assertIsNone(data.permanent_address) self.assertIsNone(data.resident_code) + self.assertIsNone(data.resident_desc) - def test_json_datat(self): + def test_json_data(self): data = get_person_by_regid("9136CCB8F66711D5BE060004AC494FFE") self.assertEqual(data.json_data()['email'], "javerage@u.washington.edu") + self.assertEqual(data.json_data()['resident_code'], + "1") + self.assertEqual(data.json_data()['resident_desc'], + "RESIDENT") + self.assertEqual(data.json_data()['visa_type'], + "") diff --git a/uw_sws/tests/test_registrations.py b/uw_sws/tests/test_registrations.py index 0a70d3e..950cbe6 100644 --- a/uw_sws/tests/test_registrations.py +++ b/uw_sws/tests/test_registrations.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_schedule_data.py b/uw_sws/tests/test_schedule_data.py index cfe98d8..7dc4f18 100644 --- a/uw_sws/tests/test_schedule_data.py +++ b/uw_sws/tests/test_schedule_data.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_section.py b/uw_sws/tests/test_section.py index 45a6ac0..c805d8b 100644 --- a/uw_sws/tests/test_section.py +++ b/uw_sws/tests/test_section.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from datetime import datetime, timedelta diff --git a/uw_sws/tests/test_section_status.py b/uw_sws/tests/test_section_status.py index e110af9..2f90b7f 100644 --- a/uw_sws/tests/test_section_status.py +++ b/uw_sws/tests/test_section_status.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/uw_sws/tests/test_term.py b/uw_sws/tests/test_term.py index e2b7467..8127bea 100644 --- a/uw_sws/tests/test_term.py +++ b/uw_sws/tests/test_term.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 import json diff --git a/uw_sws/thread.py b/uw_sws/thread.py index 2e0435e..1a3b0ee 100644 --- a/uw_sws/thread.py +++ b/uw_sws/thread.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from uw_sws import UWPWS diff --git a/uw_sws/util.py b/uw_sws/util.py index 09ca968..9d90317 100644 --- a/uw_sws/util.py +++ b/uw_sws/util.py @@ -1,4 +1,4 @@ -# Copyright 2024 UW-IT, University of Washington +# Copyright 2025 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from datetime import datetime, timedelta