@@ -88,23 +88,23 @@ def test_json_object(self):
88
88
course = Course .objects .get (subject_id = "21M.030" )
89
89
result = course .to_json_object (full = False )
90
90
expected = {
91
- CourseFields .subject_id : u "21M.030" ,
92
- CourseFields .title : u "World Music" ,
91
+ CourseFields .subject_id : "21M.030" ,
92
+ CourseFields .title : "World Music" ,
93
93
CourseFields .total_units : 12 ,
94
94
CourseFields .offered_fall : True ,
95
95
CourseFields .offered_IAP : False ,
96
96
CourseFields .offered_spring : True ,
97
97
CourseFields .offered_summer : False ,
98
98
CourseFields .public : True ,
99
- CourseFields .level : u "U" ,
100
- CourseFields .joint_subjects : [u "21M.830" , u "21M.290" ],
101
- CourseFields .equivalent_subjects : [u "21M.031" ],
102
- CourseFields .quarter_information : u "1,march 1" ,
103
- CourseFields .not_offered_year : u "2019-2020" ,
104
- CourseFields .instructors : [u "E. Zimmer" , u "C. Smith" ],
105
- CourseFields .communication_requirement : u "CI-H" ,
106
- CourseFields .hass_attribute : u "HASS-A" ,
107
- CourseFields .gir_attribute : u "REST" ,
99
+ CourseFields .level : "U" ,
100
+ CourseFields .joint_subjects : ["21M.830" , "21M.290" ],
101
+ CourseFields .equivalent_subjects : ["21M.031" ],
102
+ CourseFields .quarter_information : "1,march 1" ,
103
+ CourseFields .not_offered_year : "2019-2020" ,
104
+ CourseFields .instructors : ["E. Zimmer" , "C. Smith" ],
105
+ CourseFields .communication_requirement : "CI-H" ,
106
+ CourseFields .hass_attribute : "HASS-A" ,
107
+ CourseFields .gir_attribute : "REST" ,
108
108
}
109
109
self .maxDiff = None
110
110
self .assertDictEqual (expected , result )
@@ -113,23 +113,23 @@ def test_json_object_full(self):
113
113
course = Course .objects .get (subject_id = "21M.030" )
114
114
result = course .to_json_object ()
115
115
expected = {
116
- CourseFields .subject_id : u "21M.030" ,
117
- CourseFields .title : u "World Music" ,
116
+ CourseFields .subject_id : "21M.030" ,
117
+ CourseFields .title : "World Music" ,
118
118
CourseFields .total_units : 12 ,
119
119
CourseFields .offered_fall : True ,
120
120
CourseFields .offered_IAP : False ,
121
121
CourseFields .offered_spring : True ,
122
122
CourseFields .offered_summer : False ,
123
123
CourseFields .public : True ,
124
- CourseFields .level : u "U" ,
125
- CourseFields .joint_subjects : [u "21M.830" , u "21M.290" ],
126
- CourseFields .equivalent_subjects : [u "21M.031" ],
127
- CourseFields .quarter_information : u "1,march 1" ,
128
- CourseFields .not_offered_year : u "2019-2020" ,
129
- CourseFields .instructors : [u "E. Zimmer" , u "C. Smith" ],
130
- CourseFields .communication_requirement : u "CI-H" ,
131
- CourseFields .hass_attribute : u "HASS-A" ,
132
- CourseFields .gir_attribute : u "REST" ,
124
+ CourseFields .level : "U" ,
125
+ CourseFields .joint_subjects : ["21M.830" , "21M.290" ],
126
+ CourseFields .equivalent_subjects : ["21M.031" ],
127
+ CourseFields .quarter_information : "1,march 1" ,
128
+ CourseFields .not_offered_year : "2019-2020" ,
129
+ CourseFields .instructors : ["E. Zimmer" , "C. Smith" ],
130
+ CourseFields .communication_requirement : "CI-H" ,
131
+ CourseFields .hass_attribute : "HASS-A" ,
132
+ CourseFields .gir_attribute : "REST" ,
133
133
CourseFields .lecture_units : 5 ,
134
134
CourseFields .lab_units : 0 ,
135
135
CourseFields .design_units : 0 ,
@@ -138,11 +138,11 @@ def test_json_object_full(self):
138
138
CourseFields .is_half_class : False ,
139
139
CourseFields .pdf_option : False ,
140
140
CourseFields .has_final : False ,
141
- CourseFields .description : u "Test description of 21M.030" ,
142
- CourseFields .prerequisites : u "21M.051/''permission of instructor''" ,
143
- CourseFields .schedule : u "Lecture,4-364/MW/0/9.30-11,4-364/MW/0/11-12.30" ,
144
- CourseFields .url : u "http://student.mit.edu/catalog/m21Ma.html#21M.030" ,
145
- CourseFields .related_subjects : [u "21M.011" , u "21M.031" ],
141
+ CourseFields .description : "Test description of 21M.030" ,
142
+ CourseFields .prerequisites : "21M.051/''permission of instructor''" ,
143
+ CourseFields .schedule : "Lecture,4-364/MW/0/9.30-11,4-364/MW/0/11-12.30" ,
144
+ CourseFields .url : "http://student.mit.edu/catalog/m21Ma.html#21M.030" ,
145
+ CourseFields .related_subjects : ["21M.011" , "21M.031" ],
146
146
CourseFields .rating : 5.0 ,
147
147
CourseFields .enrollment_number : 45.0 ,
148
148
CourseFields .in_class_hours : 3.0 ,
@@ -194,8 +194,8 @@ def test_lookup_subject(self):
194
194
response = views .lookup (request , subject_id = "2.001" )
195
195
self .assertEqual (200 , response .status_code )
196
196
self .assertDictContainsSubset ({
197
- CourseFields .subject_id : u "2.001" ,
198
- CourseFields .title : u "Foo"
197
+ CourseFields .subject_id : "2.001" ,
198
+ CourseFields .title : "Foo"
199
199
}, json .loads (response .content ))
200
200
201
201
def test_lookup_subject_not_existing (self ):
0 commit comments