Esempio n. 1
0
 def test_output(self):
     lines = rp.remove_empty(rp.clean(rp.split(rp.remove_tags(self.string))))
     json = rp.parse(lines)
     correct = {'restrictions': [u'Levels', u'Campuses'],
                u'Levels': {'positive': False, 'requirements': [u'Graduate Semester']},
                u'Campuses': {'positive': True, 'requirements': [u'Georgia Tech-Atlanta *']}}
     self.assertEqual(json, correct)
Esempio n. 2
0
 def test_remove_tags(self):
     cleaned = rp.remove_empty(rp.clean(rp.split(rp.remove_tags(self.string))))
     self.assertEqual(cleaned[0], u'May not be enrolled in one of the following Levels:')
     self.assertEqual(cleaned[1], u'Graduate Semester')
     self.assertEqual(cleaned[2], u'Must be enrolled in one of the following Campuses:')
     self.assertEqual(cleaned[3], u'Georgia Tech-Atlanta *')