예제 #1
0
    def test_get_institution_name_by_id_with_cache(self):
        all_institutions = get_institutions()
        result = get_institution_name_by_id(institution_id="UIS", all_institutions=all_institutions)
        self.assertEqual("University Information Services", result)

        test_user = User.objects.create_user(username="******")
        results = get_institutions(user=test_user)

        self.assertEqual(all_institutions, results)
예제 #2
0
 def test_get_institutions_with_user(self):
     amc203 = User.objects.create_user(username="******")
     results = get_institutions(user=amc203)
     self.assertIn(("UIS", "University Information Services"), results)
예제 #3
0
 def test_get_institutions(self):
     results = get_institutions()
     self.assertIn(("UIS", "University Information Services"), results)