11import unittest .mock
2+
23import pytest
34
4- from indico .client import IndicoClient , HTTPRequest , HTTPMethod , GraphQLRequest
5+ from indico .client import GraphQLRequest , HTTPMethod , HTTPRequest , IndicoClient
56from indico .config import IndicoConfig
67
78
89@pytest .fixture (scope = "function" )
910def indico_test_config ():
1011 return IndicoConfig (protocol = "mock" , host = "mock" )
1112
13+
1214@pytest .fixture (scope = "function" )
1315def indico_request (requests_mock , indico_test_config ):
1416 def new_request_mock (method , path , * args , ** kwargs ):
@@ -69,8 +71,13 @@ def test_client_verify_true_request(indico_request, auth, indico_test_config):
6971
7072
7173def test_client_verify_false_request (indico_request , auth , indico_test_config ):
72- client = IndicoClient (IndicoConfig (verify_ssl = False , host = indico_test_config .host ,
73- protocol = indico_test_config .protocol ))
74+ client = IndicoClient (
75+ IndicoConfig (
76+ verify_ssl = False ,
77+ host = indico_test_config .host ,
78+ protocol = indico_test_config .protocol ,
79+ )
80+ )
7481 indico_request (
7582 "post" ,
7683 "/graph/api/graphql" ,
@@ -88,8 +95,7 @@ def test_client_verify_false_request(indico_request, auth, indico_test_config):
8895
8996
9097def test_client_requests_params (indico_request , auth , indico_test_config ):
91- client = IndicoClient (IndicoConfig (requests_params = {"verify" : False }, host = indico_test_config .host ,
92- protocol = indico_test_config .protocol ))
98+ client = IndicoClient (indico_test_config )
9399 indico_request (
94100 "post" ,
95101 "/graph/api/graphql" ,
@@ -105,6 +111,7 @@ def test_client_requests_params(indico_request, auth, indico_test_config):
105111 )
106112 assert response == {"datasets" : []}
107113
114+
108115def test_client_get_ipa_version (indico_request , auth , indico_test_config ):
109116 client = IndicoClient (config = indico_test_config )
110117 indico_request (
0 commit comments