예제 #1
0
 def test_dupe_calendar(self):
     enrollments = {
         'majors': ['NON MATRICULATED'],
         'minors': ['ASL'],
         'is_grad': False
     }
     cals = _get_calendars(enrollments)
     self.assertEqual(len(cals), 5)
예제 #2
0
    def test_get_by_minor(self):
        enrollments = {'majors': [], 'minors': ['ASL'], 'is_grad': False}

        cals = _get_calendars(enrollments)
        self.assertEqual(len(cals), 3)
        self.assertTrue('2_current' in cals)

        self.assertIsNone(cals['2_current'])
예제 #3
0
    def test_get_by_major(self):
        enrollments = {'majors': ['NON MATRICULATED'],
                       'minors': [],
                       'is_grad': False}

        cals = _get_calendars(enrollments)
        self.assertEqual(len(cals), 3)
        self.assertTrue('5_current' in cals)
        self.assertEqual(cals['5_current'],
                         'http://art.washington.edu/calendar/')
예제 #4
0
    def test_get_by_gradmajor(self):
        enrollments = {'majors': ['ACMS (SOC & BEH SCI)'],
                       'minors': [],
                       'is_grad': True}

        cals = _get_calendars(enrollments)
        self.assertEqual(len(cals), 3)
        self.assertIn('future_1', cals)
        self.assertIn('far_future', cals)
        self.assertIn('past', cals)
예제 #5
0
    def test_get_by_minor(self):
        enrollments = {'majors': [],
                       'minors': ['ASL'],
                       'is_grad': False}

        cals = _get_calendars(enrollments)
        self.assertEqual(len(cals), 3)
        self.assertTrue('2_current' in cals)

        self.assertIsNone(cals['2_current'])
예제 #6
0
    def test_get_by_major(self):
        enrollments = {
            'majors': ['NON MATRICULATED'],
            'minors': [],
            'is_grad': False
        }

        cals = _get_calendars(enrollments)
        self.assertEqual(len(cals), 3)
        self.assertTrue('5_current' in cals)
        self.assertEqual(cals['5_current'],
                         'http://art.washington.edu/calendar/')
예제 #7
0
    def test_get_by_gradmajor(self):
        enrollments = {
            'majors': ['ACMS (SOC & BEH SCI)'],
            'minors': [],
            'is_grad': True
        }

        cals = _get_calendars(enrollments)
        self.assertEqual(len(cals), 3)
        self.assertIn('future_1', cals)
        self.assertIn('far_future', cals)
        self.assertIn('past', cals)
예제 #8
0
 def test_dupe_calendar(self):
     enrollments = {'majors': ['NON MATRICULATED'],
                    'minors': ['ASL'],
                    'is_grad': False}
     cals = _get_calendars(enrollments)
     self.assertEqual(len(cals), 5)
예제 #9
0
 def test_unknown_major(self):
     enrollments = {'majors': ['WTFBBQ'],
                    'minors': [],
                    'is_grad': False}
     cals = _get_calendars(enrollments)
     self.assertEqual(len(cals), 0)
예제 #10
0
 def test_unknown_major(self):
     enrollments = {'majors': ['WTFBBQ'], 'minors': [], 'is_grad': False}
     cals = _get_calendars(enrollments)
     self.assertEqual(len(cals), 0)