@@ -79,7 +79,9 @@ def test_auth_client(self):
7979
8080 def test_auth_client_get_active_sessions_without_optional_filters (self ):
8181 client = AuthClient (self .http )
82- with patch .object (client , "_request_json" , Mock (return_value = {"ok" : True })) as request_json_mock :
82+ with patch .object (
83+ client , "_request_json" , Mock (return_value = {"ok" : True })
84+ ) as request_json_mock :
8385 client .get_active_sessions (continuation_token = "" , access_token = "token" )
8486 self .assertIsNone (request_json_mock .call_args .kwargs ["headers" ])
8587 self .assertIsNone (request_json_mock .call_args .kwargs ["params" ])
@@ -123,7 +125,9 @@ def test_sessions_client(self):
123125
124126 def test_sessions_client_without_optional_filters (self ):
125127 client = SessionsClient (self .http )
126- with patch .object (client , "_request_json" , Mock (return_value = {"ok" : True })) as request_json_mock :
128+ with patch .object (
129+ client , "_request_json" , Mock (return_value = {"ok" : True })
130+ ) as request_json_mock :
127131 client .get_sessions (
128132 session_type = "online" ,
129133 continuation_token = "" ,
@@ -137,12 +141,16 @@ def test_sessions_client_without_optional_filters(self):
137141 statuses = [],
138142 access_token = "token" ,
139143 )
140- self .assertEqual (request_json_mock .call_args .kwargs ["params" ], {"sessionType" : "online" })
144+ self .assertEqual (
145+ request_json_mock .call_args .kwargs ["params" ], {"sessionType" : "online" }
146+ )
141147 self .assertIsNone (request_json_mock .call_args .kwargs ["headers" ])
142148
143149 def test_sessions_client_without_upo_feature_and_pagination (self ):
144150 client = SessionsClient (self .http )
145- with patch .object (client , "_request_json" , Mock (return_value = {"ok" : True })) as request_json_mock :
151+ with patch .object (
152+ client , "_request_json" , Mock (return_value = {"ok" : True })
153+ ) as request_json_mock :
146154 client .open_online_session ({"a" : 1 }, access_token = "token" )
147155 client .open_batch_session ({"a" : 1 }, access_token = "token" )
148156 client .get_session_invoices ("ref" , continuation_token = "" , access_token = "token" )
@@ -219,7 +227,9 @@ def test_invoices_client(self):
219227
220228 def test_invoices_client_query_metadata_without_optional_params (self ):
221229 client = InvoicesClient (self .http )
222- with patch .object (client , "_request_json" , Mock (return_value = {"ok" : True })) as request_json_mock :
230+ with patch .object (
231+ client , "_request_json" , Mock (return_value = {"ok" : True })
232+ ) as request_json_mock :
223233 client .query_invoice_metadata ({"subjectType" : "Subject1" }, access_token = "token" )
224234 self .assertIsNone (request_json_mock .call_args .kwargs ["params" ])
225235
@@ -294,7 +304,9 @@ def test_certificates_client(self):
294304
295305 def test_certificates_client_query_without_pagination (self ):
296306 client = CertificatesClient (self .http )
297- with patch .object (client , "_request_json" , Mock (return_value = {"ok" : True })) as request_json_mock :
307+ with patch .object (
308+ client , "_request_json" , Mock (return_value = {"ok" : True })
309+ ) as request_json_mock :
298310 client .query_certificates ({"a" : 1 }, access_token = "token" )
299311 self .assertIsNone (request_json_mock .call_args .kwargs ["params" ])
300312
@@ -316,7 +328,9 @@ def test_tokens_client(self):
316328
317329 def test_tokens_client_list_tokens_without_optional_filters (self ):
318330 client = TokensClient (self .http )
319- with patch .object (client , "_request_json" , Mock (return_value = {"ok" : True })) as request_json_mock :
331+ with patch .object (
332+ client , "_request_json" , Mock (return_value = {"ok" : True })
333+ ) as request_json_mock :
320334 client .list_tokens (
321335 access_token = "token" ,
322336 statuses = [],
@@ -371,7 +385,9 @@ def test_peppol_client(self):
371385
372386 def test_peppol_client_without_pagination (self ):
373387 client = PeppolClient (self .http )
374- with patch .object (client , "_request_json" , Mock (return_value = {"ok" : True })) as request_json_mock :
388+ with patch .object (
389+ client , "_request_json" , Mock (return_value = {"ok" : True })
390+ ) as request_json_mock :
375391 client .list_providers ()
376392 self .assertIsNone (request_json_mock .call_args .kwargs ["params" ])
377393
@@ -652,7 +668,9 @@ async def test_async_tokens_client_list_tokens_without_optional_filters(self):
652668 http = DummyAsyncHttp (response )
653669 payload = {"a" : 1 }
654670 tokens = AsyncTokensClient (http )
655- with patch .object (tokens , "_request_json" , AsyncMock (return_value = {"ok" : True })) as request_json_mock :
671+ with patch .object (
672+ tokens , "_request_json" , AsyncMock (return_value = {"ok" : True })
673+ ) as request_json_mock :
656674 await tokens .list_tokens (
657675 access_token = "token" ,
658676 statuses = [],
@@ -705,15 +723,19 @@ async def test_async_peppol_client_without_pagination(self):
705723 response = HttpResponse (200 , httpx .Headers ({}), b"{}" )
706724 http = DummyAsyncHttp (response )
707725 peppol = AsyncPeppolClient (http )
708- with patch .object (peppol , "_request_json" , AsyncMock (return_value = {"ok" : True })) as request_json_mock :
726+ with patch .object (
727+ peppol , "_request_json" , AsyncMock (return_value = {"ok" : True })
728+ ) as request_json_mock :
709729 await peppol .list_providers ()
710730 self .assertIsNone (request_json_mock .call_args .kwargs ["params" ])
711731
712732 async def test_async_auth_client_get_active_sessions_without_optional_filters (self ):
713733 response = HttpResponse (200 , httpx .Headers ({}), b"{}" )
714734 http = DummyAsyncHttp (response )
715735 auth = AsyncAuthClient (http )
716- with patch .object (auth , "_request_json" , AsyncMock (return_value = {"ok" : True })) as request_json_mock :
736+ with patch .object (
737+ auth , "_request_json" , AsyncMock (return_value = {"ok" : True })
738+ ) as request_json_mock :
717739 await auth .get_active_sessions (continuation_token = "" , access_token = "token" )
718740 self .assertIsNone (request_json_mock .call_args .kwargs ["headers" ])
719741 self .assertIsNone (request_json_mock .call_args .kwargs ["params" ])
@@ -732,15 +754,19 @@ async def test_async_invoices_client_query_metadata_without_optional_params(self
732754 response = HttpResponse (200 , httpx .Headers ({}), b"{}" )
733755 http = DummyAsyncHttp (response )
734756 invoices = AsyncInvoicesClient (http )
735- with patch .object (invoices , "_request_json" , AsyncMock (return_value = {"ok" : True })) as request_json_mock :
757+ with patch .object (
758+ invoices , "_request_json" , AsyncMock (return_value = {"ok" : True })
759+ ) as request_json_mock :
736760 await invoices .query_invoice_metadata ({"subjectType" : "Subject1" }, access_token = "token" )
737761 self .assertIsNone (request_json_mock .call_args .kwargs ["params" ])
738762
739763 async def test_async_sessions_client_without_optional_filters (self ):
740764 response = HttpResponse (200 , httpx .Headers ({}), b"{}" )
741765 http = DummyAsyncHttp (response )
742766 sessions = AsyncSessionsClient (http )
743- with patch .object (sessions , "_request_json" , AsyncMock (return_value = {"ok" : True })) as request_json_mock :
767+ with patch .object (
768+ sessions , "_request_json" , AsyncMock (return_value = {"ok" : True })
769+ ) as request_json_mock :
744770 await sessions .get_sessions (
745771 session_type = "online" ,
746772 continuation_token = "" ,
@@ -754,18 +780,24 @@ async def test_async_sessions_client_without_optional_filters(self):
754780 statuses = [],
755781 access_token = "token" ,
756782 )
757- self .assertEqual (request_json_mock .call_args .kwargs ["params" ], {"sessionType" : "online" })
783+ self .assertEqual (
784+ request_json_mock .call_args .kwargs ["params" ], {"sessionType" : "online" }
785+ )
758786 self .assertIsNone (request_json_mock .call_args .kwargs ["headers" ])
759787
760788 async def test_async_sessions_client_without_upo_feature_and_pagination (self ):
761789 response = HttpResponse (200 , httpx .Headers ({}), b"{}" )
762790 http = DummyAsyncHttp (response )
763791 sessions = AsyncSessionsClient (http )
764- with patch .object (sessions , "_request_json" , AsyncMock (return_value = {"ok" : True })) as request_json_mock :
792+ with patch .object (
793+ sessions , "_request_json" , AsyncMock (return_value = {"ok" : True })
794+ ) as request_json_mock :
765795 await sessions .open_online_session ({"a" : 1 }, access_token = "token" )
766796 await sessions .open_batch_session ({"a" : 1 }, access_token = "token" )
767797 await sessions .get_session_invoices ("ref" , continuation_token = "" , access_token = "token" )
768- await sessions .get_session_failed_invoices ("ref" , continuation_token = "" , access_token = "token" )
798+ await sessions .get_session_failed_invoices (
799+ "ref" , continuation_token = "" , access_token = "token"
800+ )
769801
770802 self .assertIsNone (request_json_mock .call_args_list [0 ].kwargs ["headers" ])
771803 self .assertIsNone (request_json_mock .call_args_list [1 ].kwargs ["headers" ])
0 commit comments