@@ -116,9 +116,9 @@ def test_fetch_payment_invoice_query(self):
116116 mutation = self .create_mutation_str .format (
117117 payment_code = payment_code , mutation_id = mutation_client_id
118118 )
119- self .graph_client .execute (mutation , context = self .BaseTestContext ( self . user ))
119+ self .graph_client .execute (mutation , context = self .user_context . get_request ( ))
120120 output = self .graph_client .execute (self .search_for_payment_invoice_query ,
121- context = self .BaseTestContext ( self . user ))
121+ context = self .user_context . get_request ( ))
122122 expected = \
123123 {'data' : {
124124 'paymentInvoice' : {
@@ -138,7 +138,7 @@ def test_fetch_payment_invoice_query(self):
138138 def test_fetch_payment_invoice_with_detail_query (self ):
139139 payment = create_test_payment_invoice_with_details ()
140140 output = self .graph_client .execute (self .search_for_payment_invoice_with_detail_query ,
141- context = self .BaseTestContext ( self . user ))
141+ context = self .user_context . get_request ( ))
142142 expected = \
143143 {'data' : {
144144 'paymentInvoice' : {
@@ -174,7 +174,7 @@ def test_create_payment_mutation(self):
174174 mutation = self .create_mutation_str .format (
175175 payment_code = payment_code , mutation_id = mutation_client_id
176176 )
177- self .graph_client .execute (mutation , context = self .BaseTestContext ( self . user ))
177+ self .graph_client .execute (mutation , context = self .user_context . get_request ( ))
178178 expected = PaymentInvoice .objects .get (code_ext = payment_code )
179179 mutation_log = MutationLog .objects .filter (client_mutation_id = mutation_client_id ).first ()
180180 obj = PaymentInvoiceMutation .objects .get (mutation_id = mutation_log .id ).payment_invoice
@@ -188,7 +188,7 @@ def test_create_payment_with_detail_mutation(self):
188188 mutation = self .create_mutation_with_detail_str .format (
189189 payment_code = payment_code , mutation_id = mutation_client_id , invoice_uuid = invoice .id
190190 )
191- self .graph_client .execute (mutation , context = self .BaseTestContext ( self . user ))
191+ self .graph_client .execute (mutation , context = self .user_context . get_request ( ))
192192 expected = PaymentInvoice .objects .get (code_ext = payment_code )
193193 mutation_log = MutationLog .objects .filter (client_mutation_id = mutation_client_id ).first ()
194194 obj = PaymentInvoiceMutation .objects .get (mutation_id = mutation_log .id ).payment_invoice
@@ -204,11 +204,11 @@ def test_delete_payment_mutation(self):
204204 mutation = self .create_mutation_str .format (
205205 payment_code = payment_code , mutation_id = mutation_client_id
206206 )
207- self .graph_client .execute (mutation , context = self .BaseTestContext ( self . user ))
207+ self .graph_client .execute (mutation , context = self .user_context . get_request ( ))
208208 expected = PaymentInvoice .objects .get (code_ext = payment_code )
209209 mutation_client_id = str (uuid .uuid4 ())
210210 mutation = self .delete_mutation_str .format (payment_uuid = expected .id , mutation_id = mutation_client_id )
211- self .graph_client .execute (mutation , context = self .BaseTestContext ( self . user ))
211+ self .graph_client .execute (mutation , context = self .user_context . get_request ( ))
212212 # TODO: Currently deleted entries are not filtered by manager, only in GQL Query. Should we change this?
213213 payment = PaymentInvoice .objects .filter (code_ext = payment_code ).all ()
214214 mutation_ = PaymentInvoiceMutation .objects .filter (payment_invoice = payment [0 ]).all ()
@@ -222,12 +222,12 @@ def test_update_payment_mutation(self):
222222 mutation = self .create_mutation_str .format (
223223 payment_code = payment_code , mutation_id = mutation_client_id
224224 )
225- self .graph_client .execute (mutation , context = self .BaseTestContext ( self . user ))
225+ self .graph_client .execute (mutation , context = self .user_context . get_request ( ))
226226
227227 created = PaymentInvoice .objects .get (code_ext = payment_code )
228228 mutation_client_id = str (uuid .uuid4 ())
229229 mutation = self .update_mutation_str .format (payment_uuid = created .id , mutation_id = mutation_client_id )
230- self .graph_client .execute (mutation , context = self .BaseTestContext ( self . user ))
230+ self .graph_client .execute (mutation , context = self .user_context . get_request ( ))
231231
232232 expected_code_ext = "updExt"
233233 mutation_log = MutationLog .objects .filter (client_mutation_id = mutation_client_id ).first ()
0 commit comments