Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 3
0
 def test_get_institutions(self):
     results = get_institutions()
     self.assertIn(("UIS", "University Information Services"), results)