pass the hash class rather than using getattr
diff --git a/tests/hazmat/primitives/utils.py b/tests/hazmat/primitives/utils.py
index 884ce00..3149102 100644
--- a/tests/hazmat/primitives/utils.py
+++ b/tests/hazmat/primitives/utils.py
@@ -376,32 +376,32 @@
     return test_hkdf
 
 
-def generate_rsa_pss_test(param_loader, path, file_names, hash_name):
+def generate_rsa_pss_test(param_loader, path, file_names, hash_alg):
     all_params = _load_all_params(path, file_names, param_loader)
-    all_params = [i for i in all_params if i["algorithm"] == hash_name]
+    all_params = [i for i in all_params
+                  if i["algorithm"] == hash_alg.name.upper()]
 
     @pytest.mark.parametrize("params", all_params)
     def test_rsa_pss(self, backend, params):
-        rsa_pss_test(backend, params)
+        rsa_pss_test(backend, params, hash_alg)
 
     return test_rsa_pss
 
 
-def rsa_pss_test(backend, params):
+def rsa_pss_test(backend, params, hash_alg):
     public_key = rsa.RSAPublicKey(
         public_exponent=params["public_exponent"],
         modulus=params["modulus"]
     )
-    hash_cls = getattr(hashes, params["algorithm"].decode("utf8"))
     verifier = public_key.verifier(
         binascii.unhexlify(params["s"]),
         padding.PSS(
             mgf=padding.MGF1(
-                algorithm=hash_cls(),
+                algorithm=hash_alg,
                 salt_length=params["salt_length"]
             )
         ),
-        hash_cls(),
+        hash_alg,
         backend
     )
     verifier.update(binascii.unhexlify(params["msg"]))