66from app .model .petition import Petition
77from app .routers .petitions import _retrieve_verification_key , _retrieve_credential
88from app .utils .helpers import zencode , CONTRACTS
9+ from tests .conftest import AAID
910
1011
1112def auth ():
@@ -31,7 +32,7 @@ def test_create_petition(client):
3132 json = dict (
3233 petition_id = "petition" ,
3334 credential_issuer_url = "https://credentials.decodeproject.eu" ,
34- authorizable_attribute_id = "aa_test" ,
35+ authorizable_attribute_id = AAID ,
3536 credential_issuer_petition_value = [
3637 {"name" : "zip_code" , "value" : "08001" },
3738 {"name" : "email" , "value" : "puria@example.com" },
@@ -71,7 +72,7 @@ def test_not_found_ci_server(client):
7172 json = dict (
7273 petition_id = "petition" ,
7374 credential_issuer_url = "https://supernonexistent.zzz" ,
74- authorizable_attribute_id = "aa_test" ,
75+ authorizable_attribute_id = AAID ,
7576 credential_issuer_petition_value = [],
7677 ),
7778 headers = {"Authorization" : "Bearer %s" % petition_auth ()},
@@ -86,7 +87,7 @@ def test_duplicate_create_petition(client):
8687 json = dict (
8788 petition_id = "petition" ,
8889 credential_issuer_url = "https://credentials.decodeproject.eu" ,
89- authorizable_attribute_id = "aa_test" ,
90+ authorizable_attribute_id = AAID ,
9091 credential_issuer_petition_value = [
9192 {"name" : "zip_code" , "value" : "08001" },
9293 {"name" : "email" , "value" : "puria@example.com" },
@@ -102,7 +103,7 @@ def test_sign(client):
102103 petition = Bunch (
103104 petition_id = "petition" ,
104105 credential_issuer_url = "https://credentials.decodeproject.eu" ,
105- authorizable_attribute_id = "aa_test" ,
106+ authorizable_attribute_id = AAID ,
106107 credential_issuer_petition_value = [
107108 {"name" : "zip_code" , "value" : "08001" },
108109 {"name" : "email" , "value" : "puria@example.com" },
@@ -140,7 +141,7 @@ def test_duplicate_sign(client):
140141 petition = Bunch (
141142 petition_id = "petition" ,
142143 credential_issuer_url = "https://credentials.decodeproject.eu" ,
143- authorizable_attribute_id = "aa_test" ,
144+ authorizable_attribute_id = AAID ,
144145 credential_issuer_petition_value = [
145146 {"name" : "zip_code" , "value" : "08001" },
146147 {"name" : "email" , "value" : "puria@example.com" },
@@ -170,7 +171,7 @@ def test_duplicate_sign(client):
170171def test_tally (client ):
171172 r = client .post (
172173 "/petitions/petition/tally" ,
173- json = dict (authorizable_attribute_id = "aa_test" ),
174+ json = dict (authorizable_attribute_id = AAID ),
174175 headers = {"Authorization" : f"Bearer { petition_auth ()} " },
175176 )
176177 assert r .status_code == 200
@@ -180,7 +181,7 @@ def test_tally(client):
180181def test_auth_tally (client , mocker ):
181182 r = client .post (
182183 "/petitions/petition/tally" ,
183- json = dict (authorizable_attribute_id = "aa_test" ),
184+ json = dict (authorizable_attribute_id = AAID ),
184185 headers = {"Authorization" : f"Bearer { auth ()} " },
185186 )
186187 assert r .status_code == 401
0 commit comments